diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 8f1b0fa..63fd787 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -25,7 +25,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.6
- pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-macosx_10_15_x86_64.whl
+ pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp39-cp39-macosx_10_9_universal2.whl
pip install -r src/requirements_macos.txt
brew install create-dmg
- name: Build
@@ -60,7 +60,7 @@ jobs:
mv bika.zip ..
cd ..
- name: Upload
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: bika.zip
@@ -97,7 +97,7 @@ jobs:
mv src\bika ${{ env.PACKAGENAME }}
7z a -r "$($Env:PACKAGENAME + '.zip')" "bika"
- name: Upload
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}
@@ -133,7 +133,7 @@ jobs:
mv src\bika ${{ env.PACKAGENAME }}
7z a -r "$($Env:PACKAGENAME + '.zip')" "bika"
- name: Upload
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}
@@ -154,7 +154,7 @@ jobs:
sudo apt-get install -y fuse libfuse2
python -m pip install --upgrade pip
pip install pyinstaller==4.8
- pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-linux_x86_64.whl
+ pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp37-cp37m-linux_x86_64.whl
pip install -r src/requirements.txt
- name: Build
run: |
@@ -176,7 +176,7 @@ jobs:
mv PicACG-x86_64.AppImage ../../${{ env.PACKAGENAME }}-x86_64.AppImage
cd ../..
- name: Upload
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}-x86_64.AppImage
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 89409f4..e31cbd9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -42,71 +42,6 @@ jobs:
draft: true
prerelease: true
- macos:
- needs: [setup, release]
- runs-on: macos-12
- env:
- PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_macos_x64
- steps:
- - uses: actions/checkout@v4
- - name: Set up Python 3.7
- uses: actions/setup-python@v5
- with:
- python-version: 3.7
-
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install pyinstaller==4.6
- pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-macosx_10_15_x86_64.whl
- pip install -r src/requirements_macos.txt
- brew install create-dmg
- - name: Build
- run: |
- cd src
- cp ../res/icon/Icon.icns ./
- pyinstaller --clean --onedir --name PicACG \
- --hidden-import waifu2x_vulkan --hidden-import PySide6 --hidden-import requests \
- --hidden-import urllib3 --hidden-import websocket-client --hidden-import pillow \
- --hidden-import config \
- --hidden-import component \
- --hidden-import server \
- --hidden-import task \
- --hidden-import tools \
- --hidden-import view \
- --strip --windowed -i Icon.icns \
- start.py
- # rm -rf dist/PicACG
- # cp Icon.icns dist/
- # ln -s /Applications/ dist/Applications
- cp -avf db dist/PicACG.app/Contents/MacOS
- xattr -cr dist/PicACG.app
- create-dmg --volname "PicACG" --volicon "Icon.icns" --icon "PicACG.app" 200 190 \
- --window-pos 200 120 \
- --window-size 800 400 \
- --icon-size 100 \
- --hide-extension "PicACG.app" --app-drop-link 600 185 \
- ${{ env.PACKAGENAME }}.dmg dist/PicACG.app
-
- zip -9 bika.zip ${{ env.PACKAGENAME }}.dmg
- mv ${{ env.PACKAGENAME }}.dmg ..
- mv bika.zip ..
- cd ..
- - name: Upload
- uses: actions/upload-artifact@v2
- with:
- name: ${{ env.PACKAGENAME }}
- path: bika.zip
- - name: upload-macos
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ needs.release.outputs.Up_Url }}
- asset_path: ${{ env.PACKAGENAME }}.dmg
- asset_name: ${{ env.PACKAGENAME }}.dmg
- asset_content_type: application/gzip
-
macos-arm:
needs: [setup, release]
runs-on: macos-latest
@@ -123,7 +58,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- # pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.1/waifu2x_vulkan-1.1.1-cp39-cp39-macosx_10_9_universal2.whl
+ # pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp39-cp39-macosx_10_9_universal2.whl
pip install -r src/requirements_macos_arm.txt
brew install create-dmg
- name: Build
@@ -182,7 +117,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.8
- pip install pywin32==302
+ pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp36.cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl
pip install -r src\requirements.txt
- name: Build
run: |
@@ -198,7 +133,52 @@ jobs:
mv src\bika ${{ env.PACKAGENAME }}
7z a -t7z -r "$($Env:PACKAGENAME + '.7z')" "bika"
- name: Upload
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ env.PACKAGENAME }}
+ path: bika
+ - name: upload-win
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ needs.release.outputs.Up_Url }}
+ asset_path: ${{ env.PACKAGENAME }}.7z
+ asset_name: ${{ env.PACKAGENAME }}.7z
+ asset_content_type: application/zip
+
+ windows-nosr:
+ needs: [setup, release]
+ runs-on: windows-latest
+ env:
+ PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_windows_nosr_x64
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3.7
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install pyinstaller==4.8
+ pip install -r src\requirements.txt
+ - name: Build
+ run: |
+ cd src
+ cp ..\res\icon\icon.ico .\
+ pyinstaller -F -w -i icon.ico start.py
+ mv dist bika
+ Copy-Item -Verbose -Recurse -Path db -Destination bika/
+ cp ..\LICENSE bika\
+ cp ..\CHANGELOG bika\
+ cd ..
+ mkdir ${{ env.PACKAGENAME }}
+ mv src\bika ${{ env.PACKAGENAME }}
+ 7z a -t7z -r "$($Env:PACKAGENAME + '.7z')" "bika"
+ - name: Upload
+ uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: bika
@@ -228,7 +208,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.6
- pip install pywin32==302
+ pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp36.cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl
pip install -r src\requirements_win7.txt
- name: Build
run: |
@@ -244,7 +224,7 @@ jobs:
mv src\bika ${{ env.PACKAGENAME }}
7z a -t7z -r "$($Env:PACKAGENAME + '.7z')" "bika"
- name: Upload
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: bika
@@ -258,54 +238,48 @@ jobs:
asset_name: ${{ env.PACKAGENAME }}.7z
asset_content_type: application/zip
- ubuntu:
+ windows7-nosr:
needs: [setup, release]
- runs-on: ubuntu-latest
+ runs-on: windows-latest
env:
- PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_linux_x64
+ PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_windows7_nosr_x64
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
+
- name: Install dependencies
run: |
- sudo apt-get install -y fuse libfuse2
python -m pip install --upgrade pip
- pip install pyinstaller==4.8
- pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-linux_x86_64.whl
- pip install -r src/requirements.txt
+ pip install pyinstaller==4.6
+ pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp36.cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl
+ pip install -r src\requirements_win7.txt
- name: Build
run: |
cd src
- pyinstaller -w start.py
- cd dist
- mkdir -p picacg.AppRun/usr/bin
- wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
- chmod +x appimagetool-x86_64.AppImage
- cp -r ../../res/appimage/* picacg.AppRun/
- cp -r ../../res/icon/logo_round.png picacg.AppRun/PicACG.png
- cp -r start/* picacg.AppRun/usr/bin/
- cp -r ../db picacg.AppRun/
-
- mv picacg.AppRun/usr/bin/start picacg.AppRun/usr/bin/PicACG
- chmod +x picacg.AppRun/AppRun
- chmod +x picacg.AppRun/usr/bin/PicACG
- ./appimagetool-x86_64.AppImage picacg.AppRun
- mv PicACG-x86_64.AppImage ../../${{ env.PACKAGENAME }}-x86_64.AppImage
- cd ../..
+ cp ..\res\icon\icon.ico .\
+ pyinstaller -F -w -i icon.ico start.py
+ mv dist bika
+ Copy-Item -Verbose -Recurse -Path db -Destination bika/
+ cp ..\LICENSE bika\
+ cp ..\CHANGELOG bika\
+ cd ..
+ mkdir ${{ env.PACKAGENAME }}
+ mv src\bika ${{ env.PACKAGENAME }}
+ 7z a -t7z -r "$($Env:PACKAGENAME + '.7z')" "bika"
- name: Upload
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
- path: ${{ env.PACKAGENAME }}-x86_64.AppImage
+ path: bika
- name: upload-win
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.Up_Url }}
- asset_path: ${{ env.PACKAGENAME }}-x86_64.AppImage
- asset_name: ${{ env.PACKAGENAME }}-x86_64.AppImage
+ asset_path: ${{ env.PACKAGENAME }}.7z
+ asset_name: ${{ env.PACKAGENAME }}.7z
asset_content_type: application/zip
diff --git a/src/component/list/comic_list_widget.py b/src/component/list/comic_list_widget.py
index 0feff3d..2953ea9 100644
--- a/src/component/list/comic_list_widget.py
+++ b/src/component/list/comic_list_widget.py
@@ -327,7 +327,7 @@ class ComicListWidget(BaseListWidget):
if widget and widget.picData:
w, h, mat,_ = 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, mat)
+ model = ToolUtil.GetModelByIndex(Setting.CoverLookModelName.value, Setting.CoverLookScale.value, mat)
widget.isWaifu2xLoading = True
if self.isLocal:
self.AddConvertTask(widget.path, widget.picData, model, self.Waifu2xPictureBack, index, noSaveCache=True)
diff --git a/src/component/widget/main_widget.py b/src/component/widget/main_widget.py
index 2f99e9b..6e807fd 100644
--- a/src/component/widget/main_widget.py
+++ b/src/component/widget/main_widget.py
@@ -10,7 +10,7 @@ MainType = 1
Main = None
-if Setting.IsUseTitleBar.value:
+if False:
try:
from interface.ui_main_windows import Ui_MainWindows
# from .windows.frame_less_widget import FrameLessWidget
diff --git a/src/component/widget/navigation_widget.py b/src/component/widget/navigation_widget.py
index 4702c16..80faa19 100644
--- a/src/component/widget/navigation_widget.py
+++ b/src/component/widget/navigation_widget.py
@@ -23,8 +23,8 @@ class NavigationWidget(QWidget, Ui_Navigation, QtTaskBase):
QtTaskBase.__init__(self)
self.allFilterStr = set()
self.setupUi(self)
- if Setting.IsUseTitleBar.value:
- self.scrollArea.setFixedHeight(380)
+ # if Setting.IsUseTitleBar.value:
+ # self.scrollArea.setFixedHeight(380)
# self.resize(260, 800)
self.__ani = QPropertyAnimation(self, b"geometry")
self.__connect = None
diff --git a/src/config/config.py b/src/config/config.py
index a9eaf9c..c44476a 100644
--- a/src/config/config.py
+++ b/src/config/config.py
@@ -50,15 +50,16 @@ Issues1 = "https://github.com/tonquer/picacg-qt/issues"
Issues2 = "https://hub.ggo.icu/tonquer/picacg-qt/issues"
Issues3 = "https://hub.fastgit.xyz/tonquer/picacg-qt/issues"
-UpdateVersion = "v1.5.0"
-RealVersion = "v1.5.0"
-TimeVersion = "2024-4-6"
+UpdateVersion = "v1.5.1"
+RealVersion = "v1.5.1"
+TimeVersion = "2024-10-27"
DbVersion = ""
-Waifu2xVersion = "1.1.6"
+Waifu2xVersion = "1.2.0"
# waifu2x
+CloseWaifu2x = False
CanWaifu2x = True
ErrorMsg = ""
diff --git a/src/config/global_config.py b/src/config/global_config.py
index 13b38ab..8eb615c 100644
--- a/src/config/global_config.py
+++ b/src/config/global_config.py
@@ -22,6 +22,7 @@ class GlobalItem(object):
class GlobalConfig:
Ver = GlobalItem(0)
+ VerTime = GlobalItem("2024-10-15")
LocalProxyIndex = [2, 3]
Address = GlobalItem(["104.21.91.145", "188.114.98.153"])
AddressIpv6 = GlobalItem(["2606:4700:d:28:dbf4:26f3:c265:73bc", "2a06:98c1:3120:ca71:be2c:c721:d2b5:5dbf"])
@@ -65,11 +66,18 @@ class GlobalConfig:
@staticmethod
def LoadSetting():
try:
+ newKv = {}
for k, v in dict(Setting.GlobalConfig.value).items():
Log.Debug("load global setting, k={}, v={}".format(k, v))
- value = getattr(GlobalConfig, k)
- if isinstance(value, GlobalItem) :
- value.set_value(v)
+ newKv[k] = v
+ oldV = newKv.get("Ver", 0)
+ if GlobalConfig.Ver.value > oldV:
+ Log.Debug("can not load old config, ver:{}->{}".format(oldV, GlobalConfig.Ver.value))
+ else:
+ for k, v in newKv.items():
+ value = getattr(GlobalConfig, k, "")
+ if isinstance(value, GlobalItem):
+ value.set_value(v)
except Exception as es:
Log.Error(es)
pass
diff --git a/src/config/setting.py b/src/config/setting.py
index c5a5955..8f38ad8 100644
--- a/src/config/setting.py
+++ b/src/config/setting.py
@@ -90,7 +90,7 @@ class Setting:
CategorySize = SettingValue("GeneraSetting", 80, False) #
ScaleLevel = SettingValue("GeneraSetting", 0, True, ["Auto", 100, 125, 150, 175, 200])
- IsUseTitleBar = SettingValue("GeneraSetting", 1, True)
+ # IsUseTitleBar = SettingValue("GeneraSetting", 1, True)
FontName = SettingValue("GeneraSetting", "", True)
FontSize = SettingValue("GeneraSetting", "", True)
@@ -128,18 +128,22 @@ class Setting:
CoverIsOpenWaifu = SettingValue("Waifu2xSetting", 0, False)
CoverMaxNum = SettingValue("Waifu2xSetting", 400, False)
CoverLookModel = SettingValue("Waifu2xSetting", 0, False)
- CoverLookNoise = SettingValue("Waifu2xSetting", 3, False)
+ CoverLookModelName = SettingValue("Waifu2xSetting", "MODEL_WAIFU2X_ANIME_UP2X_DENOISE3X", False)
+ # CoverLookModel = SettingValue("Waifu2xSetting", 0, False)
+ # CoverLookNoise = SettingValue("Waifu2xSetting", 3, False)
CoverLookScale = SettingValue("Waifu2xSetting", 2.0, False)
IsOpenWaifu = SettingValue("Waifu2xSetting", 0, False)
LookMaxNum = SettingValue("Waifu2xSetting", 4096, False)
- LookModel = SettingValue("Waifu2xSetting", 0, False)
- LookNoise = SettingValue("Waifu2xSetting", 3, False)
+ LookModelName = SettingValue("Waifu2xSetting", "MODEL_WAIFU2X_ANIME_UP2X_DENOISE3X", False)
+ # LookModel = SettingValue("Waifu2xSetting", 0, False)
+ # LookNoise = SettingValue("Waifu2xSetting", 3, False)
LookScale = SettingValue("Waifu2xSetting", 2.0, False)
DownloadAuto = SettingValue("Waifu2xSetting", 0, False)
- DownloadModel = SettingValue("Waifu2xSetting", 1, False)
- DownloadNoise = SettingValue("Waifu2xSetting", 3, False)
+ DownloadModelName = SettingValue("Waifu2xSetting", "MODEL_WAIFU2X_CUNET_UP2X_DENOISE3X", False)
+ # DownloadModel = SettingValue("Waifu2xSetting", 1, False)
+ # DownloadNoise = SettingValue("Waifu2xSetting", 3, False)
DownloadScale = SettingValue("Waifu2xSetting", 2.0, False)
# 看图设置
@@ -148,7 +152,7 @@ class Setting:
TurnSpeed = SettingValue("ReadSetting", 5000, False)
ScrollSpeed = SettingValue("ReadSetting", 400, False)
PreDownWaifu2x = SettingValue("ReadSetting", 1, False)
- IsOpenOpenGL = SettingValue("ReadSetting", 1, True)
+ IsOpenOpenGL = SettingValue("ReadSetting", 0, True)
# Other
UserId = SettingValue("Other", "", False)
diff --git a/src/interface/ui_download.py b/src/interface/ui_download.py
index b34688e..b94d4b6 100644
--- a/src/interface/ui_download.py
+++ b/src/interface/ui_download.py
@@ -15,9 +15,10 @@ 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, QCheckBox, QGridLayout, QHBoxLayout,
- QHeaderView, QPushButton, QRadioButton, QSizePolicy,
- QSpacerItem, QTableWidget, QTableWidgetItem, QWidget)
+from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout,
+ QHBoxLayout, QHeaderView, QLineEdit, QPushButton,
+ QRadioButton, QSizePolicy, QSpacerItem, QTableWidget,
+ QTableWidgetItem, QWidget)
class Ui_Download(object):
def setupUi(self, Download):
@@ -26,6 +27,45 @@ class Ui_Download(object):
Download.resize(920, 440)
self.gridLayout_2 = QGridLayout(Download)
self.gridLayout_2.setObjectName(u"gridLayout_2")
+ self.horizontalLayout_2 = QHBoxLayout()
+ self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
+ self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
+
+ self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
+
+ self.redownloadRadio = QCheckBox(Download)
+ self.redownloadRadio.setObjectName(u"redownloadRadio")
+
+ self.horizontalLayout_2.addWidget(self.redownloadRadio)
+
+ self.radioButton = QRadioButton(Download)
+ self.radioButton.setObjectName(u"radioButton")
+ self.radioButton.setEnabled(True)
+ self.radioButton.setChecked(True)
+
+ self.horizontalLayout_2.addWidget(self.radioButton)
+
+
+ self.gridLayout_2.addLayout(self.horizontalLayout_2, 2, 0, 1, 1)
+
+ self.horizontalLayout_5 = QHBoxLayout()
+ self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
+ self.comboBox = QComboBox(Download)
+ self.comboBox.addItem("")
+ self.comboBox.addItem("")
+ self.comboBox.addItem("")
+ self.comboBox.setObjectName(u"comboBox")
+
+ self.horizontalLayout_5.addWidget(self.comboBox)
+
+ self.lineEdit = QLineEdit(Download)
+ self.lineEdit.setObjectName(u"lineEdit")
+
+ self.horizontalLayout_5.addWidget(self.lineEdit)
+
+
+ self.gridLayout_2.addLayout(self.horizontalLayout_5, 0, 0, 1, 1)
+
self.gridLayout = QGridLayout()
self.gridLayout.setObjectName(u"gridLayout")
self.tableWidget = QTableWidget(Download)
@@ -57,6 +97,9 @@ class Ui_Download(object):
self.gridLayout.addWidget(self.tableWidget, 5, 0, 1, 1)
+
+ self.gridLayout_2.addLayout(self.gridLayout, 3, 0, 1, 1)
+
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
@@ -89,31 +132,7 @@ class Ui_Download(object):
self.horizontalLayout.addWidget(self.pushButton_4)
- self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
-
-
- self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1)
-
- self.horizontalLayout_2 = QHBoxLayout()
- self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
- self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
-
- self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
-
- self.redownloadRadio = QCheckBox(Download)
- self.redownloadRadio.setObjectName(u"redownloadRadio")
-
- self.horizontalLayout_2.addWidget(self.redownloadRadio)
-
- self.radioButton = QRadioButton(Download)
- self.radioButton.setObjectName(u"radioButton")
- self.radioButton.setEnabled(True)
- self.radioButton.setChecked(True)
-
- self.horizontalLayout_2.addWidget(self.radioButton)
-
-
- self.gridLayout_2.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
+ self.gridLayout_2.addLayout(self.horizontalLayout, 1, 0, 1, 1)
self.retranslateUi(Download)
@@ -128,6 +147,12 @@ class Ui_Download(object):
def retranslateUi(self, Download):
Download.setWindowTitle(QCoreApplication.translate("Download", u"\u4e0b\u8f7d", None))
+ self.redownloadRadio.setText(QCoreApplication.translate("Download", u"\u4e0b\u8f7d\u5931\u8d25\u540e\u81ea\u52a8\u91cd\u8bd5", None))
+ self.radioButton.setText(QCoreApplication.translate("Download", u"\u4e0b\u8f7d\u81ea\u52a8Waifu2x\u8f6c\u6362", None))
+ self.comboBox.setItemText(0, QCoreApplication.translate("Download", u"\u5168\u90e8", None))
+ self.comboBox.setItemText(1, QCoreApplication.translate("Download", u"\u672a\u5b8c\u6210", None))
+ self.comboBox.setItemText(2, QCoreApplication.translate("Download", u"\u5df2\u5b8c\u6210", None))
+
___qtablewidgetitem = self.tableWidget.horizontalHeaderItem(0)
___qtablewidgetitem.setText(QCoreApplication.translate("Download", u"id", None));
___qtablewidgetitem1 = self.tableWidget.horizontalHeaderItem(1)
@@ -155,7 +180,5 @@ class Ui_Download(object):
self.pushButton_3.setText(QCoreApplication.translate("Download", u"\u6682\u505c\u4e0b\u8f7d", None))
self.pushButton_2.setText(QCoreApplication.translate("Download", u"\u5f00\u59cb\u8f6c\u6362", None))
self.pushButton_4.setText(QCoreApplication.translate("Download", u"\u6682\u505c\u8f6c\u6362", None))
- self.redownloadRadio.setText(QCoreApplication.translate("Download", u"\u4e0b\u8f7d\u5931\u8d25\u540e\u81ea\u52a8\u91cd\u8bd5", None))
- self.radioButton.setText(QCoreApplication.translate("Download", u"\u4e0b\u8f7d\u81ea\u52a8Waifu2x\u8f6c\u6362", None))
# retranslateUi
diff --git a/src/interface/ui_help.py b/src/interface/ui_help.py
index aa6fc65..a528f94 100644
--- a/src/interface/ui_help.py
+++ b/src/interface/ui_help.py
@@ -36,7 +36,7 @@ class Ui_Help(object):
self.scrollArea.setWidgetResizable(True)
self.scrollAreaWidgetContents = QWidget()
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
- self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 736, 744))
+ self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 736, 771))
self.verticalLayout_3 = QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout = QHBoxLayout()
@@ -87,25 +87,18 @@ class Ui_Help(object):
self.label_5.setMinimumSize(QSize(80, 50))
self.label_5.setFont(font)
- self.gridLayout.addWidget(self.label_5, 3, 0, 1, 1)
+ self.gridLayout.addWidget(self.label_5, 4, 0, 1, 1)
- self.dbCheck = QPushButton(self.widget_2)
- self.dbCheck.setObjectName(u"dbCheck")
+ self.label_9 = QLabel(self.widget_2)
+ self.label_9.setObjectName(u"label_9")
+ self.label_9.setFont(font)
- self.gridLayout.addWidget(self.dbCheck, 5, 2, 1, 1)
+ self.gridLayout.addWidget(self.label_9, 1, 0, 1, 1)
- self.label_4 = QLabel(self.widget_2)
- self.label_4.setObjectName(u"label_4")
- self.label_4.setMinimumSize(QSize(80, 50))
- self.label_4.setFont(font)
+ self.preCheckBox = QCheckBox(self.widget_2)
+ self.preCheckBox.setObjectName(u"preCheckBox")
- self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1)
-
- self.localTime = QLabel(self.widget_2)
- self.localTime.setObjectName(u"localTime")
- self.localTime.setFont(font)
-
- self.gridLayout.addWidget(self.localTime, 5, 1, 1, 1)
+ self.gridLayout.addWidget(self.preCheckBox, 0, 2, 1, 1)
self.label_6 = QLabel(self.widget_2)
self.label_6.setObjectName(u"label_6")
@@ -114,32 +107,47 @@ class Ui_Help(object):
self.gridLayout.addWidget(self.label_6, 2, 0, 1, 1)
- self.upTimeLabel = QLabel(self.widget_2)
- self.upTimeLabel.setObjectName(u"upTimeLabel")
- self.upTimeLabel.setFont(font)
+ self.dbCheck = QPushButton(self.widget_2)
+ self.dbCheck.setObjectName(u"dbCheck")
- self.gridLayout.addWidget(self.upTimeLabel, 1, 1, 1, 1)
+ self.gridLayout.addWidget(self.dbCheck, 7, 2, 1, 1)
+
+ self.label_10 = QLabel(self.widget_2)
+ self.label_10.setObjectName(u"label_10")
+ self.label_10.setMinimumSize(QSize(80, 50))
+ self.label_10.setFont(font)
+
+ self.gridLayout.addWidget(self.label_10, 6, 0, 1, 1)
+
+ self.label_4 = QLabel(self.widget_2)
+ self.label_4.setObjectName(u"label_4")
+ self.label_4.setMinimumSize(QSize(80, 50))
+ self.label_4.setFont(font)
+
+ self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1)
self.verCheck = QPushButton(self.widget_2)
self.verCheck.setObjectName(u"verCheck")
self.gridLayout.addWidget(self.verCheck, 1, 2, 1, 1)
- self.localNum = QLabel(self.widget_2)
- self.localNum.setObjectName(u"localNum")
- self.localNum.setFont(font)
+ self.label_7 = QLabel(self.widget_2)
+ self.label_7.setObjectName(u"label_7")
+ self.label_7.setMinimumSize(QSize(80, 50))
+ self.label_7.setFont(font)
- self.gridLayout.addWidget(self.localNum, 3, 1, 1, 1)
+ self.gridLayout.addWidget(self.label_7, 8, 0, 1, 1)
- self.openCmd = QPushButton(self.widget_2)
- self.openCmd.setObjectName(u"openCmd")
+ self.localVer = QLabel(self.widget_2)
+ self.localVer.setObjectName(u"localVer")
+ self.localVer.setFont(font)
- self.gridLayout.addWidget(self.openCmd, 6, 1, 1, 1)
+ self.gridLayout.addWidget(self.localVer, 6, 1, 1, 1)
- self.preCheckBox = QCheckBox(self.widget_2)
- self.preCheckBox.setObjectName(u"preCheckBox")
+ self.logButton = QPushButton(self.widget_2)
+ self.logButton.setObjectName(u"logButton")
- self.gridLayout.addWidget(self.preCheckBox, 0, 2, 1, 1)
+ self.gridLayout.addWidget(self.logButton, 8, 2, 1, 1)
self.version = QLabel(self.widget_2)
self.version.setObjectName(u"version")
@@ -147,29 +155,16 @@ class Ui_Help(object):
self.gridLayout.addWidget(self.version, 0, 1, 1, 1)
- self.label_9 = QLabel(self.widget_2)
- self.label_9.setObjectName(u"label_9")
- self.label_9.setFont(font)
+ self.localNum = QLabel(self.widget_2)
+ self.localNum.setObjectName(u"localNum")
+ self.localNum.setFont(font)
- self.gridLayout.addWidget(self.label_9, 1, 0, 1, 1)
+ self.gridLayout.addWidget(self.localNum, 4, 1, 1, 1)
- self.logButton = QPushButton(self.widget_2)
- self.logButton.setObjectName(u"logButton")
+ self.openCmd = QPushButton(self.widget_2)
+ self.openCmd.setObjectName(u"openCmd")
- self.gridLayout.addWidget(self.logButton, 6, 2, 1, 1)
-
- self.label_7 = QLabel(self.widget_2)
- self.label_7.setObjectName(u"label_7")
- self.label_7.setMinimumSize(QSize(80, 50))
- self.label_7.setFont(font)
-
- self.gridLayout.addWidget(self.label_7, 6, 0, 1, 1)
-
- self.label_11 = QLabel(self.widget_2)
- self.label_11.setObjectName(u"label_11")
- self.label_11.setFont(font)
-
- self.gridLayout.addWidget(self.label_11, 5, 0, 1, 1)
+ self.gridLayout.addWidget(self.openCmd, 8, 1, 1, 1)
self.waifu2x = QLabel(self.widget_2)
self.waifu2x.setObjectName(u"waifu2x")
@@ -177,18 +172,35 @@ class Ui_Help(object):
self.gridLayout.addWidget(self.waifu2x, 2, 1, 1, 1)
- self.label_10 = QLabel(self.widget_2)
- self.label_10.setObjectName(u"label_10")
- self.label_10.setMinimumSize(QSize(80, 50))
- self.label_10.setFont(font)
+ self.label_11 = QLabel(self.widget_2)
+ self.label_11.setObjectName(u"label_11")
+ self.label_11.setFont(font)
- self.gridLayout.addWidget(self.label_10, 4, 0, 1, 1)
+ self.gridLayout.addWidget(self.label_11, 7, 0, 1, 1)
- self.localVer = QLabel(self.widget_2)
- self.localVer.setObjectName(u"localVer")
- self.localVer.setFont(font)
+ self.upTimeLabel = QLabel(self.widget_2)
+ self.upTimeLabel.setObjectName(u"upTimeLabel")
+ self.upTimeLabel.setFont(font)
- self.gridLayout.addWidget(self.localVer, 4, 1, 1, 1)
+ self.gridLayout.addWidget(self.upTimeLabel, 1, 1, 1, 1)
+
+ self.localTime = QLabel(self.widget_2)
+ self.localTime.setObjectName(u"localTime")
+ self.localTime.setFont(font)
+
+ self.gridLayout.addWidget(self.localTime, 7, 1, 1, 1)
+
+ self.label_12 = QLabel(self.widget_2)
+ self.label_12.setObjectName(u"label_12")
+ self.label_12.setFont(font)
+
+ self.gridLayout.addWidget(self.label_12, 3, 0, 1, 1)
+
+ self.configVer = QLabel(self.widget_2)
+ self.configVer.setObjectName(u"configVer")
+ self.configVer.setFont(font)
+
+ self.gridLayout.addWidget(self.configVer, 3, 1, 1, 1)
self.verticalLayout_2.addWidget(self.widget_2)
@@ -252,23 +264,25 @@ class Ui_Help(object):
self.label_3.setText(QCoreApplication.translate("Help", u"\u60f3\u63d0\u4f9b\u4e00\u4e9b\u5efa\u8bae\uff1f", None))
self.pushButton.setText(QCoreApplication.translate("Help", u"Github Issue", None))
self.label_5.setText(QCoreApplication.translate("Help", u"\u672c\u5730\u5e93\u6570\u91cf:", None))
+ self.label_9.setText(QCoreApplication.translate("Help", u"\u4e0a\u6b21\u66f4\u65b0\u65f6\u95f4\uff1a", None))
+ self.preCheckBox.setText(QCoreApplication.translate("Help", u"\u63a5\u53d7Beta\u7248\u672c\u66f4\u65b0", None))
+ self.label_6.setText(QCoreApplication.translate("Help", u"\u56fe\u7247\u8d85\u5206\u7248\u672c:", None))
self.dbCheck.setText(QCoreApplication.translate("Help", u"\u68c0\u6d4b\u66f4\u65b0", None))
+ self.label_10.setText(QCoreApplication.translate("Help", u"\u672c\u5730\u5e93\u7248\u672c\uff1a", None))
self.label_4.setText(QCoreApplication.translate("Help", u"\u7248\u672c\u53f7:", None))
- self.localTime.setText("")
- self.label_6.setText(QCoreApplication.translate("Help", u"waifu2x\u7248\u672c:", None))
- self.upTimeLabel.setText(QCoreApplication.translate("Help", u"2021-11-27", None))
self.verCheck.setText(QCoreApplication.translate("Help", u"\u68c0\u6d4b\u66f4\u65b0", None))
+ self.label_7.setText(QCoreApplication.translate("Help", u"\u65e5\u5fd7:", None))
+ self.localVer.setText("")
+ self.logButton.setText(QCoreApplication.translate("Help", u"\u6253\u5f00\u65e5\u5fd7\u76ee\u5f55", None))
+ self.version.setText(QCoreApplication.translate("Help", u"v1.2.8", None))
self.localNum.setText("")
self.openCmd.setText(QCoreApplication.translate("Help", u"\u6253\u5f00\u63a7\u5236\u53f0", None))
- self.preCheckBox.setText(QCoreApplication.translate("Help", u"\u63a5\u53d7Beta\u7248\u672c\u66f4\u65b0", None))
- self.version.setText(QCoreApplication.translate("Help", u"v1.2.8", None))
- self.label_9.setText(QCoreApplication.translate("Help", u"\u4e0a\u6b21\u66f4\u65b0\u65f6\u95f4\uff1a", None))
- self.logButton.setText(QCoreApplication.translate("Help", u"\u6253\u5f00\u65e5\u5fd7\u76ee\u5f55", None))
- self.label_7.setText(QCoreApplication.translate("Help", u"\u65e5\u5fd7:", None))
- self.label_11.setText(QCoreApplication.translate("Help", u"\u672c\u5730\u6570\u636e\u4e0a\u6b21\u66f4\u65b0:", None))
self.waifu2x.setText(QCoreApplication.translate("Help", u"v1.0.8", None))
- self.label_10.setText(QCoreApplication.translate("Help", u"\u672c\u5730\u5e93\u7248\u672c\uff1a", None))
- self.localVer.setText("")
+ self.label_11.setText(QCoreApplication.translate("Help", u"\u672c\u5730\u6570\u636e\u4e0a\u6b21\u66f4\u65b0:", None))
+ self.upTimeLabel.setText(QCoreApplication.translate("Help", u"2021-11-27", None))
+ self.localTime.setText("")
+ self.label_12.setText(QCoreApplication.translate("Help", u"\u914d\u7f6e\u7248\u672c", None))
+ self.configVer.setText("")
self.label_8.setText(QCoreApplication.translate("Help", u"\u65b0\u7248\u672c\uff1a", None))
self.updateLabel.setText("")
self.updateButton.setText(QCoreApplication.translate("Help", u"\u524d\u5f80\u66f4\u65b0", None))
diff --git a/src/interface/ui_navigation.py b/src/interface/ui_navigation.py
index dd3fa33..47f46a2 100644
--- a/src/interface/ui_navigation.py
+++ b/src/interface/ui_navigation.py
@@ -174,7 +174,7 @@ class Ui_Navigation(object):
self.scrollArea.setWidgetResizable(False)
self.scrollAreaWidgetContents = QWidget()
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
- self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 339, 800))
+ self.scrollAreaWidgetContents.setGeometry(QRect(0, -521, 339, 800))
self.verticalLayout_3 = QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_3.setSpacing(6)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
@@ -548,7 +548,7 @@ class Ui_Navigation(object):
self.nasButton.setText(QCoreApplication.translate("Navigation", u"\u7f51\u7edc\u5b58\u50a8", None))
self.localReadButton.setText(QCoreApplication.translate("Navigation", u"\u672c\u5730\u6f2b\u753b", None))
self.convertButton.setText(QCoreApplication.translate("Navigation", u"\u8f6c\u6362", None))
- self.waifu2xButton.setText(QCoreApplication.translate("Navigation", u"Waifu2x", None))
+ self.waifu2xButton.setText(QCoreApplication.translate("Navigation", u"\u56fe\u7247\u8d85\u5206", None))
self.helpButton.setText(QCoreApplication.translate("Navigation", u"\u5e2e\u52a9", None))
self.settingButton.setText(QCoreApplication.translate("Navigation", u"\u8bbe\u7f6e", None))
# retranslateUi
diff --git a/src/interface/ui_read_tool.py b/src/interface/ui_read_tool.py
index ee5f94e..855193a 100644
--- a/src/interface/ui_read_tool.py
+++ b/src/interface/ui_read_tool.py
@@ -40,7 +40,7 @@ class Ui_ReadImg(object):
self.scrollArea22.setWidgetResizable(True)
self.scrollAreaWidgetContents = QWidget()
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
- self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 309, 827))
+ self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 301, 841))
self.verticalLayout_2 = QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.verticalLayout = QVBoxLayout()
@@ -127,71 +127,54 @@ class Ui_ReadImg(object):
self.gridLayout = QGridLayout()
self.gridLayout.setObjectName(u"gridLayout")
- self.horizontalLayout_8 = QHBoxLayout()
- self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
- self.modelLabel = QLabel(self.scrollAreaWidgetContents)
- self.modelLabel.setObjectName(u"modelLabel")
+ self.sizeWaifu = QLabel(self.scrollAreaWidgetContents)
+ self.sizeWaifu.setObjectName(u"sizeWaifu")
- self.horizontalLayout_8.addWidget(self.modelLabel)
-
- self.modelBox = WheelComboBox(self.scrollAreaWidgetContents)
- self.modelBox.addItem("")
- self.modelBox.addItem("")
- self.modelBox.addItem("")
- self.modelBox.addItem("")
- self.modelBox.setObjectName(u"modelBox")
-
- self.horizontalLayout_8.addWidget(self.modelBox)
-
-
- self.gridLayout.addLayout(self.horizontalLayout_8, 6, 1, 1, 1)
-
- self.label_8 = QLabel(self.scrollAreaWidgetContents)
- self.label_8.setObjectName(u"label_8")
- self.label_8.setMaximumSize(QSize(35, 16777215))
-
- self.gridLayout.addWidget(self.label_8, 6, 0, 1, 1)
-
- self.label_3 = QLabel(self.scrollAreaWidgetContents)
- self.label_3.setObjectName(u"label_3")
-
- self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
+ self.gridLayout.addWidget(self.sizeWaifu, 8, 0, 1, 1)
self.label_9 = QLabel(self.scrollAreaWidgetContents)
self.label_9.setObjectName(u"label_9")
- self.gridLayout.addWidget(self.label_9, 7, 0, 1, 1)
+ self.gridLayout.addWidget(self.label_9, 6, 0, 1, 1)
- self.tickLabel = QLabel(self.scrollAreaWidgetContents)
- self.tickLabel.setObjectName(u"tickLabel")
+ self.waifu2xSize = QLabel(self.scrollAreaWidgetContents)
+ self.waifu2xSize.setObjectName(u"waifu2xSize")
- self.gridLayout.addWidget(self.tickLabel, 10, 0, 1, 1)
-
- self.waifu2xTick = QLabel(self.scrollAreaWidgetContents)
- self.waifu2xTick.setObjectName(u"waifu2xTick")
-
- self.gridLayout.addWidget(self.waifu2xTick, 10, 1, 1, 1)
-
- self.gpuLabel = QLabel(self.scrollAreaWidgetContents)
- self.gpuLabel.setObjectName(u"gpuLabel")
-
- self.gridLayout.addWidget(self.gpuLabel, 7, 1, 1, 1)
+ self.gridLayout.addWidget(self.waifu2xSize, 8, 1, 1, 1)
self.waifu2xRes = QLabel(self.scrollAreaWidgetContents)
self.waifu2xRes.setObjectName(u"waifu2xRes")
- self.gridLayout.addWidget(self.waifu2xRes, 8, 1, 1, 1)
+ self.gridLayout.addWidget(self.waifu2xRes, 7, 1, 1, 1)
- self.waifu2xStatus = QLabel(self.scrollAreaWidgetContents)
- self.waifu2xStatus.setObjectName(u"waifu2xStatus")
+ self.curWaifu2x = QCheckBox(self.scrollAreaWidgetContents)
+ self.curWaifu2x.setObjectName(u"curWaifu2x")
- self.gridLayout.addWidget(self.waifu2xStatus, 11, 1, 1, 1)
+ self.gridLayout.addWidget(self.curWaifu2x, 1, 1, 1, 1)
self.waifu2xSave = QPushButton(self.scrollAreaWidgetContents)
self.waifu2xSave.setObjectName(u"waifu2xSave")
self.gridLayout.addWidget(self.waifu2xSave, 3, 0, 1, 1)
+ self.waifu2xStatus = QLabel(self.scrollAreaWidgetContents)
+ self.waifu2xStatus.setObjectName(u"waifu2xStatus")
+
+ self.gridLayout.addWidget(self.waifu2xStatus, 10, 1, 1, 1)
+
+ self.label_8 = QLabel(self.scrollAreaWidgetContents)
+ self.label_8.setObjectName(u"label_8")
+ self.label_8.setMaximumSize(QSize(35, 16777215))
+
+ self.gridLayout.addWidget(self.label_8, 5, 0, 1, 1)
+
+ self.checkBox = QCheckBox(self.scrollAreaWidgetContents)
+ self.checkBox.setObjectName(u"checkBox")
+ self.checkBox.setStyleSheet(u"")
+ self.checkBox.setChecked(True)
+
+ self.gridLayout.addWidget(self.checkBox, 1, 0, 1, 1)
+
self.horizontalLayout_9 = QHBoxLayout()
self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
self.waifu2xCancle = QPushButton(self.scrollAreaWidgetContents)
@@ -202,37 +185,27 @@ class Ui_ReadImg(object):
self.gridLayout.addLayout(self.horizontalLayout_9, 3, 1, 1, 1)
- self.waifu2xSize = QLabel(self.scrollAreaWidgetContents)
- self.waifu2xSize.setObjectName(u"waifu2xSize")
+ self.gpuLabel = QLabel(self.scrollAreaWidgetContents)
+ self.gpuLabel.setObjectName(u"gpuLabel")
+ self.gpuLabel.setMaximumSize(QSize(150, 16777215))
+ self.gpuLabel.setWordWrap(True)
- self.gridLayout.addWidget(self.waifu2xSize, 9, 1, 1, 1)
+ self.gridLayout.addWidget(self.gpuLabel, 6, 1, 1, 1)
- self.label_2 = QLabel(self.scrollAreaWidgetContents)
- self.label_2.setObjectName(u"label_2")
+ self.label_3 = QLabel(self.scrollAreaWidgetContents)
+ self.label_3.setObjectName(u"label_3")
- self.gridLayout.addWidget(self.label_2, 4, 0, 1, 1)
-
- self.checkBox = QCheckBox(self.scrollAreaWidgetContents)
- self.checkBox.setObjectName(u"checkBox")
- self.checkBox.setStyleSheet(u"")
- self.checkBox.setChecked(True)
-
- self.gridLayout.addWidget(self.checkBox, 1, 0, 1, 1)
-
- self.curWaifu2x = QCheckBox(self.scrollAreaWidgetContents)
- self.curWaifu2x.setObjectName(u"curWaifu2x")
-
- self.gridLayout.addWidget(self.curWaifu2x, 1, 1, 1, 1)
-
- self.stateWaifu = QLabel(self.scrollAreaWidgetContents)
- self.stateWaifu.setObjectName(u"stateWaifu")
-
- self.gridLayout.addWidget(self.stateWaifu, 11, 0, 1, 1)
+ self.gridLayout.addWidget(self.label_3, 4, 0, 1, 1)
self.resolutionWaifu = QLabel(self.scrollAreaWidgetContents)
self.resolutionWaifu.setObjectName(u"resolutionWaifu")
- self.gridLayout.addWidget(self.resolutionWaifu, 8, 0, 1, 1)
+ self.gridLayout.addWidget(self.resolutionWaifu, 7, 0, 1, 1)
+
+ self.stateWaifu = QLabel(self.scrollAreaWidgetContents)
+ self.stateWaifu.setObjectName(u"stateWaifu")
+
+ self.gridLayout.addWidget(self.stateWaifu, 10, 0, 1, 1)
self.horizontalLayout_6 = QHBoxLayout()
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
@@ -251,38 +224,33 @@ class Ui_ReadImg(object):
self.horizontalLayout_6.addWidget(self.scaleBox)
- self.gridLayout.addLayout(self.horizontalLayout_6, 5, 1, 1, 1)
+ self.gridLayout.addLayout(self.horizontalLayout_6, 4, 1, 1, 1)
- self.sizeWaifu = QLabel(self.scrollAreaWidgetContents)
- self.sizeWaifu.setObjectName(u"sizeWaifu")
+ self.waifu2xTick = QLabel(self.scrollAreaWidgetContents)
+ self.waifu2xTick.setObjectName(u"waifu2xTick")
- self.gridLayout.addWidget(self.sizeWaifu, 9, 0, 1, 1)
+ self.gridLayout.addWidget(self.waifu2xTick, 9, 1, 1, 1)
- self.horizontalLayout_3 = QHBoxLayout()
- self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
- self.noiseLabel = QLabel(self.scrollAreaWidgetContents)
- self.noiseLabel.setObjectName(u"noiseLabel")
+ self.tickLabel = QLabel(self.scrollAreaWidgetContents)
+ self.tickLabel.setObjectName(u"tickLabel")
- self.horizontalLayout_3.addWidget(self.noiseLabel)
-
- self.noiseBox = WheelComboBox(self.scrollAreaWidgetContents)
- self.noiseBox.addItem("")
- self.noiseBox.addItem("")
- self.noiseBox.addItem("")
- self.noiseBox.addItem("")
- self.noiseBox.addItem("")
- self.noiseBox.setObjectName(u"noiseBox")
-
- self.horizontalLayout_3.addWidget(self.noiseBox)
-
-
- self.gridLayout.addLayout(self.horizontalLayout_3, 4, 1, 1, 1)
+ self.gridLayout.addWidget(self.tickLabel, 9, 0, 1, 1)
self.preDownWaifu2x = QCheckBox(self.scrollAreaWidgetContents)
self.preDownWaifu2x.setObjectName(u"preDownWaifu2x")
self.gridLayout.addWidget(self.preDownWaifu2x, 2, 1, 1, 1)
+ self.horizontalLayout_8 = QHBoxLayout()
+ self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
+ self.modelNameButton = QPushButton(self.scrollAreaWidgetContents)
+ self.modelNameButton.setObjectName(u"modelNameButton")
+
+ self.horizontalLayout_8.addWidget(self.modelNameButton)
+
+
+ self.gridLayout.addLayout(self.horizontalLayout_8, 5, 1, 1, 1)
+
self.verticalLayout.addLayout(self.gridLayout)
@@ -524,38 +492,25 @@ class Ui_ReadImg(object):
self.epsLabel2.setText("")
self.resolutionLabel2.setText("")
self.label.setText(QCoreApplication.translate("ReadImg", u"Waifu2x\u53c2\u6570", None))
- self.modelLabel.setText(QCoreApplication.translate("ReadImg", u"CUNET", None))
- self.modelBox.setItemText(0, QCoreApplication.translate("ReadImg", u"\u81ea\u52a8", None))
- self.modelBox.setItemText(1, QCoreApplication.translate("ReadImg", u"cunet", None))
- self.modelBox.setItemText(2, QCoreApplication.translate("ReadImg", u"photo", None))
- self.modelBox.setItemText(3, QCoreApplication.translate("ReadImg", u"anime_style_art_rgb", None))
-
- self.label_8.setText(QCoreApplication.translate("ReadImg", u"\u6a21\u578b\uff1a", None))
- self.label_3.setText(QCoreApplication.translate("ReadImg", u"\u653e\u5927\u500d\u6570\uff1a", None))
- self.label_9.setText(QCoreApplication.translate("ReadImg", u"\u8f6c\u6362\u6a21\u5f0f\uff1a", None))
- self.tickLabel.setText(QCoreApplication.translate("ReadImg", u"\u8017\u65f6\uff1a", None))
- self.waifu2xTick.setText("")
- self.gpuLabel.setText(QCoreApplication.translate("ReadImg", u"GPU", None))
- self.waifu2xRes.setText("")
- self.waifu2xStatus.setText("")
- self.waifu2xSave.setText(QCoreApplication.translate("ReadImg", u"\u4fee\u6539\u53c2\u6570", None))
- self.waifu2xCancle.setText(QCoreApplication.translate("ReadImg", u"\u4fdd\u5b58", None))
- self.waifu2xSize.setText("")
- self.label_2.setText(QCoreApplication.translate("ReadImg", u"\u53bb\u566a\u7b49\u7ea7\uff1a", None))
- self.checkBox.setText(QCoreApplication.translate("ReadImg", u"\u81ea\u52a8Waifu2x", None))
- self.curWaifu2x.setText(QCoreApplication.translate("ReadImg", u"\u672c\u5f20\u56fe\u5f00\u542fWaifu2x (F2)", None))
- self.stateWaifu.setText(QCoreApplication.translate("ReadImg", u"\u72b6\u6001\uff1a", None))
- self.resolutionWaifu.setText(QCoreApplication.translate("ReadImg", u"\u5206\u8fa8\u7387\uff1a", None))
- self.scaleLabel.setText(QCoreApplication.translate("ReadImg", u"2", None))
self.sizeWaifu.setText(QCoreApplication.translate("ReadImg", u"\u5927\u5c0f\uff1a", None))
- self.noiseLabel.setText(QCoreApplication.translate("ReadImg", u"3", None))
- self.noiseBox.setItemText(0, QCoreApplication.translate("ReadImg", u"\u81ea\u52a8", None))
- self.noiseBox.setItemText(1, QCoreApplication.translate("ReadImg", u"0", None))
- self.noiseBox.setItemText(2, QCoreApplication.translate("ReadImg", u"1", None))
- self.noiseBox.setItemText(3, QCoreApplication.translate("ReadImg", u"2", None))
- self.noiseBox.setItemText(4, QCoreApplication.translate("ReadImg", u"3", None))
-
+ self.label_9.setText(QCoreApplication.translate("ReadImg", u"\u8f6c\u6362\u6a21\u5f0f\uff1a", None))
+ self.waifu2xSize.setText("")
+ self.waifu2xRes.setText("")
+ self.curWaifu2x.setText(QCoreApplication.translate("ReadImg", u"\u672c\u5f20\u56fe\u5f00\u542fWaifu2x (F2)", None))
+ self.waifu2xSave.setText(QCoreApplication.translate("ReadImg", u"\u4fee\u6539\u53c2\u6570", None))
+ self.waifu2xStatus.setText("")
+ self.label_8.setText(QCoreApplication.translate("ReadImg", u"\u6a21\u578b\uff1a", None))
+ self.checkBox.setText(QCoreApplication.translate("ReadImg", u"\u81ea\u52a8Waifu2x", None))
+ self.waifu2xCancle.setText(QCoreApplication.translate("ReadImg", u"\u4fdd\u5b58", None))
+ self.gpuLabel.setText(QCoreApplication.translate("ReadImg", u"GPU", None))
+ self.label_3.setText(QCoreApplication.translate("ReadImg", u"\u653e\u5927\u500d\u6570\uff1a", None))
+ self.resolutionWaifu.setText(QCoreApplication.translate("ReadImg", u"\u5206\u8fa8\u7387\uff1a", None))
+ self.stateWaifu.setText(QCoreApplication.translate("ReadImg", u"\u72b6\u6001\uff1a", None))
+ self.scaleLabel.setText(QCoreApplication.translate("ReadImg", u"2", None))
+ self.waifu2xTick.setText("")
+ self.tickLabel.setText(QCoreApplication.translate("ReadImg", u"\u8017\u65f6\uff1a", None))
self.preDownWaifu2x.setText(QCoreApplication.translate("ReadImg", u"\u4f18\u5148\u4f7f\u7528\u4e0b\u8f7d\u8f6c\u6362\u597d\u7684", None))
+ self.modelNameButton.setText("")
self.label_6.setText(QCoreApplication.translate("ReadImg", u"\u7ffb\u9875\u8bbe\u7f6e", None))
self.label_5.setText(QCoreApplication.translate("ReadImg", u"\u7ffb\u9875\u6a21\u5f0f\uff1a", None))
self.comboBox.setItemText(0, QCoreApplication.translate("ReadImg", u"\u4e0a\u4e0b\u6eda\u52a8", None))
diff --git a/src/interface/ui_setting_new.py b/src/interface/ui_setting_new.py
index 1b65747..ca941a1 100644
--- a/src/interface/ui_setting_new.py
+++ b/src/interface/ui_setting_new.py
@@ -18,7 +18,7 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
from PySide6.QtWidgets import (QApplication, QButtonGroup, QCheckBox, QCommandLinkButton,
QFrame, QHBoxLayout, QLabel, QLineEdit,
QPushButton, QRadioButton, QSizePolicy, QSpacerItem,
- QVBoxLayout, QWidget)
+ QToolButton, QVBoxLayout, QWidget)
from component.box.wheel_combo_box import WheelComboBox
from component.box.wheel_double_spin_box import WheelDoubleSpinBox
@@ -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, -899, 727, 3096))
+ self.scrollAreaWidgetContents.setGeometry(QRect(0, -601, 727, 2937))
self.scrollAreaWidgetContents.setStyleSheet(u"")
self.verticalLayout_4 = QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
@@ -366,26 +366,6 @@ class Ui_SettingNew(object):
self.verticalLayout_4.addWidget(self.frame_13)
- self.frame = QFrame(self.scrollAreaWidgetContents)
- self.frame.setObjectName(u"frame")
- self.frame.setFrameShape(QFrame.StyledPanel)
- self.frame.setFrameShadow(QFrame.Raised)
- self.verticalLayout_14 = QVBoxLayout(self.frame)
- self.verticalLayout_14.setObjectName(u"verticalLayout_14")
- self.label_30 = QLabel(self.frame)
- self.label_30.setObjectName(u"label_30")
- self.label_30.setFont(font1)
-
- self.verticalLayout_14.addWidget(self.label_30)
-
- self.titleBox = QCheckBox(self.frame)
- self.titleBox.setObjectName(u"titleBox")
-
- self.verticalLayout_14.addWidget(self.titleBox)
-
-
- self.verticalLayout_4.addWidget(self.frame)
-
self.frame_17 = QFrame(self.scrollAreaWidgetContents)
self.frame_17.setObjectName(u"frame_17")
self.frame_17.setFrameShape(QFrame.StyledPanel)
@@ -876,32 +856,6 @@ class Ui_SettingNew(object):
self.verticalLayout_10.addLayout(self.horizontalLayout_21)
- self.horizontalLayout_4 = QHBoxLayout()
- self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
- self.label_13 = QLabel(self.frame_8)
- self.label_13.setObjectName(u"label_13")
- self.label_13.setMinimumSize(QSize(60, 0))
- self.label_13.setMaximumSize(QSize(156, 16777215))
-
- self.horizontalLayout_4.addWidget(self.label_13)
-
- self.readNoise = WheelComboBox(self.frame_8)
- self.readNoise.addItem("")
- self.readNoise.addItem("")
- self.readNoise.addItem("")
- self.readNoise.addItem("")
- self.readNoise.setObjectName(u"readNoise")
- self.readNoise.setMinimumSize(QSize(150, 0))
-
- self.horizontalLayout_4.addWidget(self.readNoise)
-
- self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
-
- self.horizontalLayout_4.addItem(self.horizontalSpacer_2)
-
-
- self.verticalLayout_10.addLayout(self.horizontalLayout_4)
-
self.horizontalLayout_5 = QHBoxLayout()
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.label_14 = QLabel(self.frame_8)
@@ -911,15 +865,10 @@ class Ui_SettingNew(object):
self.horizontalLayout_5.addWidget(self.label_14)
- self.readModel = WheelComboBox(self.frame_8)
- self.readModel.addItem("")
- self.readModel.addItem("")
- self.readModel.addItem("")
- self.readModel.addItem("")
- self.readModel.setObjectName(u"readModel")
- self.readModel.setMinimumSize(QSize(150, 0))
+ self.readModelName = QToolButton(self.frame_8)
+ self.readModelName.setObjectName(u"readModelName")
- self.horizontalLayout_5.addWidget(self.readModel)
+ self.horizontalLayout_5.addWidget(self.readModelName)
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
@@ -998,32 +947,6 @@ class Ui_SettingNew(object):
self.verticalLayout_15.addLayout(self.horizontalLayout_11)
- self.horizontalLayout_12 = QHBoxLayout()
- self.horizontalLayout_12.setObjectName(u"horizontalLayout_12")
- self.label_23 = QLabel(self.frame_12)
- self.label_23.setObjectName(u"label_23")
- self.label_23.setMinimumSize(QSize(60, 0))
- self.label_23.setMaximumSize(QSize(156, 16777215))
-
- self.horizontalLayout_12.addWidget(self.label_23)
-
- self.coverNoise = WheelComboBox(self.frame_12)
- self.coverNoise.addItem("")
- self.coverNoise.addItem("")
- self.coverNoise.addItem("")
- self.coverNoise.addItem("")
- self.coverNoise.setObjectName(u"coverNoise")
- self.coverNoise.setMinimumSize(QSize(150, 0))
-
- self.horizontalLayout_12.addWidget(self.coverNoise)
-
- self.horizontalSpacer_10 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
-
- self.horizontalLayout_12.addItem(self.horizontalSpacer_10)
-
-
- self.verticalLayout_15.addLayout(self.horizontalLayout_12)
-
self.horizontalLayout_13 = QHBoxLayout()
self.horizontalLayout_13.setObjectName(u"horizontalLayout_13")
self.label_25 = QLabel(self.frame_12)
@@ -1033,15 +956,10 @@ class Ui_SettingNew(object):
self.horizontalLayout_13.addWidget(self.label_25)
- self.coverModel = WheelComboBox(self.frame_12)
- self.coverModel.addItem("")
- self.coverModel.addItem("")
- self.coverModel.addItem("")
- self.coverModel.addItem("")
- self.coverModel.setObjectName(u"coverModel")
- self.coverModel.setMinimumSize(QSize(150, 0))
+ self.coverModelName = QToolButton(self.frame_12)
+ self.coverModelName.setObjectName(u"coverModelName")
- self.horizontalLayout_13.addWidget(self.coverModel)
+ self.horizontalLayout_13.addWidget(self.coverModelName)
self.horizontalSpacer_11 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
@@ -1098,32 +1016,6 @@ class Ui_SettingNew(object):
self.verticalLayout_11.addWidget(self.downAuto)
- self.horizontalLayout_8 = QHBoxLayout()
- self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
- self.label_17 = QLabel(self.frame_9)
- self.label_17.setObjectName(u"label_17")
- self.label_17.setMinimumSize(QSize(60, 0))
- self.label_17.setMaximumSize(QSize(156, 16777215))
-
- self.horizontalLayout_8.addWidget(self.label_17)
-
- self.downNoise = WheelComboBox(self.frame_9)
- self.downNoise.addItem("")
- self.downNoise.addItem("")
- self.downNoise.addItem("")
- self.downNoise.addItem("")
- self.downNoise.setObjectName(u"downNoise")
- self.downNoise.setMinimumSize(QSize(150, 0))
-
- self.horizontalLayout_8.addWidget(self.downNoise)
-
- self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
-
- self.horizontalLayout_8.addItem(self.horizontalSpacer_5)
-
-
- self.verticalLayout_11.addLayout(self.horizontalLayout_8)
-
self.horizontalLayout_9 = QHBoxLayout()
self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
self.label_18 = QLabel(self.frame_9)
@@ -1133,15 +1025,10 @@ class Ui_SettingNew(object):
self.horizontalLayout_9.addWidget(self.label_18)
- self.downModel = WheelComboBox(self.frame_9)
- self.downModel.addItem("")
- self.downModel.addItem("")
- self.downModel.addItem("")
- self.downModel.addItem("")
- self.downModel.setObjectName(u"downModel")
- self.downModel.setMinimumSize(QSize(150, 0))
+ self.downModelName = QToolButton(self.frame_9)
+ self.downModelName.setObjectName(u"downModelName")
- self.horizontalLayout_9.addWidget(self.downModel)
+ self.horizontalLayout_9.addWidget(self.downModelName)
self.horizontalSpacer_6 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
@@ -1470,8 +1357,6 @@ class Ui_SettingNew(object):
self.mainScaleButton3.setText(QCoreApplication.translate("SettingNew", u"150%", None))
self.mainScaleButton4.setText(QCoreApplication.translate("SettingNew", u"175%", None))
self.mainScaleButton5.setText(QCoreApplication.translate("SettingNew", u"200%", None))
- self.label_30.setText(QCoreApplication.translate("SettingNew", u"\u6807\u9898\u680f\u8bbe\u7f6e\uff08\u9700\u91cd\u542f\uff09", None))
- self.titleBox.setText(QCoreApplication.translate("SettingNew", u"\u6807\u9898\u680f\u7f8e\u5316\uff08\u591a\u5c4f\u5efa\u8bae\u4e0d\u52fe\u9009\uff0cwin11\u53ef\u4e0d\u52fe\u9009\uff09", None))
self.label_38.setText(QCoreApplication.translate("SettingNew", u"\u5173\u95ed\u8bbe\u7f6e", None))
self.showCloseButton0.setText(QCoreApplication.translate("SettingNew", u"\u5173\u95ed\u540e\u9000\u51fa", None))
self.showCloseButton1.setText(QCoreApplication.translate("SettingNew", u"\u5173\u95ed\u540e\u6700\u5c0f\u5316\u5230\u6258\u76d8", None))
@@ -1520,49 +1405,19 @@ class Ui_SettingNew(object):
self.readCheckBox.setText(QCoreApplication.translate("SettingNew", u"\u662f\u5426\u542f\u7528", None))
self.preDownWaifu2x.setText(QCoreApplication.translate("SettingNew", u"\u4f18\u5148\u4f7f\u7528\u4e0b\u8f7d\u8f6c\u6362\u597d\u7684\u7f13\u5b58", None))
self.label_28.setText(QCoreApplication.translate("SettingNew", u"\u4e3a\u4e86\u4fdd\u8bc1\u901f\u5ea6\uff0c\u56fe\u7247\u5206\u8fa8\u7387\u5c0f\u4e8e\u7b49\u4e8e\u8be5\u503c\u65f6\u624d\u8fdb\u884c\u8f6c\u6362\uff08\u9ed8\u8ba44096P\uff09", None))
- self.label_13.setText(QCoreApplication.translate("SettingNew", u"\u53bb\u566a\u7b49\u7ea7", None))
- self.readNoise.setItemText(0, QCoreApplication.translate("SettingNew", u"0", None))
- self.readNoise.setItemText(1, QCoreApplication.translate("SettingNew", u"1", None))
- self.readNoise.setItemText(2, QCoreApplication.translate("SettingNew", u"2", None))
- self.readNoise.setItemText(3, QCoreApplication.translate("SettingNew", u"3", None))
-
self.label_14.setText(QCoreApplication.translate("SettingNew", u"\u6a21\u578b", None))
- self.readModel.setItemText(0, QCoreApplication.translate("SettingNew", u"\u81ea\u52a8", None))
- self.readModel.setItemText(1, QCoreApplication.translate("SettingNew", u"cunet", None))
- self.readModel.setItemText(2, QCoreApplication.translate("SettingNew", u"photo", None))
- self.readModel.setItemText(3, QCoreApplication.translate("SettingNew", u"anime_style_art_rgb", None))
-
+ self.readModelName.setText("")
self.label_15.setText(QCoreApplication.translate("SettingNew", u"\u653e\u5927\u500d\u6570", None))
self.label_24.setText(QCoreApplication.translate("SettingNew", u"Waifu2x\u5c01\u9762\u6a21\u5f0f\uff08\u5f00\u542f\u540e\u6240\u6709\u5c01\u9762\u4f1a\u7ecf\u8fc7Waifu2x\u5904\u7406\uff09", None))
self.coverCheckBox.setText(QCoreApplication.translate("SettingNew", u"\u662f\u5426\u542f\u7528", None))
self.label_22.setText(QCoreApplication.translate("SettingNew", u"\u4e3a\u4e86\u4fdd\u8bc1\u901f\u5ea6\uff0c\u5c01\u9762\u5206\u8fa8\u7387\u5c0f\u4e8e\u7b49\u4e8e\u8be5\u503c\u65f6\u624d\u8fdb\u884c\u8f6c\u6362\uff08\u9ed8\u8ba4400P\uff09", None))
- self.label_23.setText(QCoreApplication.translate("SettingNew", u"\u53bb\u566a\u7b49\u7ea7", None))
- self.coverNoise.setItemText(0, QCoreApplication.translate("SettingNew", u"0", None))
- self.coverNoise.setItemText(1, QCoreApplication.translate("SettingNew", u"1", None))
- self.coverNoise.setItemText(2, QCoreApplication.translate("SettingNew", u"2", None))
- self.coverNoise.setItemText(3, QCoreApplication.translate("SettingNew", u"3", None))
-
self.label_25.setText(QCoreApplication.translate("SettingNew", u"\u6a21\u578b", None))
- self.coverModel.setItemText(0, QCoreApplication.translate("SettingNew", u"\u81ea\u52a8", None))
- self.coverModel.setItemText(1, QCoreApplication.translate("SettingNew", u"cunet", None))
- self.coverModel.setItemText(2, QCoreApplication.translate("SettingNew", u"photo", None))
- self.coverModel.setItemText(3, QCoreApplication.translate("SettingNew", u"anime_style_art_rgb", None))
-
+ self.coverModelName.setText("")
self.label_26.setText(QCoreApplication.translate("SettingNew", u"\u653e\u5927\u500d\u6570", None))
self.label_16.setText(QCoreApplication.translate("SettingNew", u"waifu2x\u4e0b\u8f7d\u6a21\u5f0f\uff08\u5f00\u542f\u540e\u4e0b\u8f7d\u5b8c\u6210\u4f1a\u7ecf\u8fc7Waifu2x\u5904\u7406\uff09", None))
self.downAuto.setText(QCoreApplication.translate("SettingNew", u"\u4e0b\u8f7d\u5b8c\u540e\u81ea\u52a8\u8f6c\u6362", None))
- self.label_17.setText(QCoreApplication.translate("SettingNew", u"\u53bb\u566a\u7b49\u7ea7", None))
- self.downNoise.setItemText(0, QCoreApplication.translate("SettingNew", u"0", None))
- self.downNoise.setItemText(1, QCoreApplication.translate("SettingNew", u"1", None))
- self.downNoise.setItemText(2, QCoreApplication.translate("SettingNew", u"2", None))
- self.downNoise.setItemText(3, QCoreApplication.translate("SettingNew", u"3", None))
-
self.label_18.setText(QCoreApplication.translate("SettingNew", u"\u6a21\u578b", None))
- self.downModel.setItemText(0, QCoreApplication.translate("SettingNew", u"\u81ea\u52a8", None))
- self.downModel.setItemText(1, QCoreApplication.translate("SettingNew", u"cunet", None))
- self.downModel.setItemText(2, QCoreApplication.translate("SettingNew", u"photo", None))
- self.downModel.setItemText(3, QCoreApplication.translate("SettingNew", u"anime_style_art_rgb", None))
-
+ self.downModelName.setText("")
self.label_19.setText(QCoreApplication.translate("SettingNew", u"\u653e\u5927\u500d\u6570", None))
self.downloadLabel.setText(QCoreApplication.translate("SettingNew", u"\u4e0b\u8f7d\u4e0e\u7f13\u5b58", None))
self.label_36.setText(QCoreApplication.translate("SettingNew", u"\u4fdd\u5b58\u8def\u5f84\u683c\u5f0f\u8bbe\u7f6e\uff08\u65b0\u4e0b\u8f7d\u7684\u6587\u4ef6\u624d\u80fd\u751f\u6548\uff09", None))
diff --git a/src/interface/ui_sr_select_widget.py b/src/interface/ui_sr_select_widget.py
new file mode 100644
index 0000000..47ab353
--- /dev/null
+++ b/src/interface/ui_sr_select_widget.py
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'ui_sr_select_widget.ui'
+##
+## Created by: Qt User Interface Compiler version 6.2.4
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QAbstractItemView, QApplication, QHBoxLayout, QHeaderView,
+ QLabel, QPushButton, QSizePolicy, QTableWidget,
+ QTableWidgetItem, QVBoxLayout, QWidget)
+import images_rc
+
+class Ui_SrSelect(object):
+ def setupUi(self, SrSelect):
+ if not SrSelect.objectName():
+ SrSelect.setObjectName(u"SrSelect")
+ SrSelect.resize(673, 345)
+ SrSelect.setMinimumSize(QSize(500, 0))
+ self.verticalLayout = QVBoxLayout(SrSelect)
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.label_4 = QLabel(SrSelect)
+ self.label_4.setObjectName(u"label_4")
+
+ self.verticalLayout.addWidget(self.label_4)
+
+ self.label = QLabel(SrSelect)
+ self.label.setObjectName(u"label")
+
+ self.verticalLayout.addWidget(self.label)
+
+ self.tableWidget = QTableWidget(SrSelect)
+ if (self.tableWidget.columnCount() < 4):
+ self.tableWidget.setColumnCount(4)
+ __qtablewidgetitem = QTableWidgetItem()
+ self.tableWidget.setHorizontalHeaderItem(0, __qtablewidgetitem)
+ __qtablewidgetitem1 = QTableWidgetItem()
+ self.tableWidget.setHorizontalHeaderItem(1, __qtablewidgetitem1)
+ __qtablewidgetitem2 = QTableWidgetItem()
+ self.tableWidget.setHorizontalHeaderItem(2, __qtablewidgetitem2)
+ __qtablewidgetitem3 = QTableWidgetItem()
+ self.tableWidget.setHorizontalHeaderItem(3, __qtablewidgetitem3)
+ self.tableWidget.setObjectName(u"tableWidget")
+ self.tableWidget.setEditTriggers(QAbstractItemView.NoEditTriggers)
+ self.tableWidget.setSelectionBehavior(QAbstractItemView.SelectRows)
+ self.tableWidget.setSortingEnabled(True)
+ self.tableWidget.horizontalHeader().setVisible(True)
+ self.tableWidget.horizontalHeader().setCascadingSectionResizes(False)
+ self.tableWidget.horizontalHeader().setDefaultSectionSize(25)
+ self.tableWidget.horizontalHeader().setHighlightSections(False)
+ self.tableWidget.horizontalHeader().setProperty("showSortIndicator", True)
+ self.tableWidget.horizontalHeader().setStretchLastSection(False)
+ self.tableWidget.verticalHeader().setVisible(True)
+ self.tableWidget.verticalHeader().setMinimumSectionSize(23)
+ self.tableWidget.verticalHeader().setDefaultSectionSize(23)
+ self.tableWidget.verticalHeader().setHighlightSections(True)
+ self.tableWidget.verticalHeader().setProperty("showSortIndicator", False)
+ self.tableWidget.verticalHeader().setStretchLastSection(False)
+
+ self.verticalLayout.addWidget(self.tableWidget)
+
+ self.horizontalLayout_3 = QHBoxLayout()
+ self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
+ self.saveButton = QPushButton(SrSelect)
+ self.saveButton.setObjectName(u"saveButton")
+ self.saveButton.setMaximumSize(QSize(150, 30))
+ self.saveButton.setStyleSheet(u"")
+
+ self.horizontalLayout_3.addWidget(self.saveButton)
+
+ self.closeButton = QPushButton(SrSelect)
+ self.closeButton.setObjectName(u"closeButton")
+ self.closeButton.setMaximumSize(QSize(150, 30))
+
+ self.horizontalLayout_3.addWidget(self.closeButton)
+
+
+ self.verticalLayout.addLayout(self.horizontalLayout_3)
+
+
+ self.retranslateUi(SrSelect)
+
+ QMetaObject.connectSlotsByName(SrSelect)
+ # setupUi
+
+ def retranslateUi(self, SrSelect):
+ SrSelect.setWindowTitle(QCoreApplication.translate("SrSelect", u"Form", None))
+ self.label_4.setText(QCoreApplication.translate("SrSelect", u"\u652f\u6301Waifu2x\u3001Real-CUGAN\u3001Real-ESRGAN\uff08\u4e0d\u652f\u6301CPU\uff09", None))
+ self.label.setText(QCoreApplication.translate("SrSelect", u"UP2X\uff1a\u91c7\u6837\u500d\u7387(\u5efa\u8bae\u90092X)\uff0cDENOISE\uff1a\u964d\u566a\u7b49\u7ea7(\u5efa\u8bae\u9009\u6700\u9ad8),", None))
+ ___qtablewidgetitem = self.tableWidget.horizontalHeaderItem(0)
+ ___qtablewidgetitem.setText(QCoreApplication.translate("SrSelect", u"\u6a21\u578b\u540d", None));
+ ___qtablewidgetitem1 = self.tableWidget.horizontalHeaderItem(1)
+ ___qtablewidgetitem1.setText(QCoreApplication.translate("SrSelect", u"\u7b97\u6cd5", None));
+ ___qtablewidgetitem2 = self.tableWidget.horizontalHeaderItem(2)
+ ___qtablewidgetitem2.setText(QCoreApplication.translate("SrSelect", u"\u8017\u65f6", None));
+ ___qtablewidgetitem3 = self.tableWidget.horizontalHeaderItem(3)
+ ___qtablewidgetitem3.setText(QCoreApplication.translate("SrSelect", u"\u63cf\u8ff0", None));
+ self.saveButton.setText(QCoreApplication.translate("SrSelect", u"\u786e\u5b9a", None))
+#if QT_CONFIG(shortcut)
+ self.saveButton.setShortcut(QCoreApplication.translate("SrSelect", u"Return", None))
+#endif // QT_CONFIG(shortcut)
+ self.closeButton.setText(QCoreApplication.translate("SrSelect", u"\u5173\u95ed", None))
+ # retranslateUi
+
diff --git a/src/interface/ui_waifu2x_tool.py b/src/interface/ui_waifu2x_tool.py
index 39a7564..f212da4 100644
--- a/src/interface/ui_waifu2x_tool.py
+++ b/src/interface/ui_waifu2x_tool.py
@@ -20,11 +20,13 @@ from PySide6.QtWidgets import (QApplication, QButtonGroup, QCheckBox, QComboBox,
QLabel, QLineEdit, QPushButton, QRadioButton,
QSizePolicy, QSpacerItem, QVBoxLayout, QWidget)
+from component.scroll_area.smooth_scroll_area import SmoothScrollArea
+
class Ui_Waifu2xTool(object):
def setupUi(self, Waifu2xTool):
if not Waifu2xTool.objectName():
Waifu2xTool.setObjectName(u"Waifu2xTool")
- Waifu2xTool.resize(502, 556)
+ Waifu2xTool.resize(705, 498)
self.gridLayout = QGridLayout(Waifu2xTool)
self.gridLayout.setObjectName(u"gridLayout")
self.graphicsView = QGraphicsView(Waifu2xTool)
@@ -34,38 +36,40 @@ class Ui_Waifu2xTool(object):
self.verticalLayout = QVBoxLayout()
self.verticalLayout.setObjectName(u"verticalLayout")
- self.line_3 = QFrame(Waifu2xTool)
- self.line_3.setObjectName(u"line_3")
- self.line_3.setFrameShape(QFrame.VLine)
- self.line_3.setFrameShadow(QFrame.Sunken)
-
- self.verticalLayout.addWidget(self.line_3)
-
+ self.scrollArea = SmoothScrollArea(Waifu2xTool)
+ self.scrollArea.setObjectName(u"scrollArea")
+ self.scrollArea.setMaximumSize(QSize(300, 16777215))
+ self.scrollArea.setWidgetResizable(True)
+ self.scrollAreaWidgetContents = QWidget()
+ self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
+ self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 275, 480))
+ self.verticalLayout_4 = QVBoxLayout(self.scrollAreaWidgetContents)
+ self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.verticalLayout_2 = QVBoxLayout()
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
- self.line_5 = QFrame(Waifu2xTool)
+ self.line_5 = QFrame(self.scrollAreaWidgetContents)
self.line_5.setObjectName(u"line_5")
self.line_5.setFrameShape(QFrame.VLine)
self.line_5.setFrameShadow(QFrame.Sunken)
self.verticalLayout_2.addWidget(self.line_5)
- self.checkBox = QCheckBox(Waifu2xTool)
+ self.checkBox = QCheckBox(self.scrollAreaWidgetContents)
self.checkBox.setObjectName(u"checkBox")
self.checkBox.setMaximumSize(QSize(100, 16777215))
self.checkBox.setChecked(True)
self.verticalLayout_2.addWidget(self.checkBox)
- self.ttaModel = QCheckBox(Waifu2xTool)
+ self.ttaModel = QCheckBox(self.scrollAreaWidgetContents)
self.ttaModel.setObjectName(u"ttaModel")
self.ttaModel.setMaximumSize(QSize(100, 16777215))
- self.verticalLayout_2.addWidget(self.ttaModel)
+ self.verticalLayout_2.addWidget(self.ttaModel, 0, Qt.AlignLeft)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
- self.scaleRadio = QRadioButton(Waifu2xTool)
+ self.scaleRadio = QRadioButton(self.scrollAreaWidgetContents)
self.buttonGroup_2 = QButtonGroup(Waifu2xTool)
self.buttonGroup_2.setObjectName(u"buttonGroup_2")
self.buttonGroup_2.addButton(self.scaleRadio)
@@ -73,9 +77,9 @@ class Ui_Waifu2xTool(object):
self.scaleRadio.setMaximumSize(QSize(100, 16777215))
self.scaleRadio.setChecked(True)
- self.horizontalLayout_3.addWidget(self.scaleRadio)
+ self.horizontalLayout_3.addWidget(self.scaleRadio, 0, Qt.AlignLeft)
- self.scaleEdit = QLineEdit(Waifu2xTool)
+ self.scaleEdit = QLineEdit(self.scrollAreaWidgetContents)
self.scaleEdit.setObjectName(u"scaleEdit")
self.scaleEdit.setMaximumSize(QSize(160, 16777215))
self.scaleEdit.setAlignment(Qt.AlignCenter)
@@ -87,14 +91,14 @@ class Ui_Waifu2xTool(object):
self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
- self.heighRadio = QRadioButton(Waifu2xTool)
+ self.heighRadio = QRadioButton(self.scrollAreaWidgetContents)
self.buttonGroup_2.addButton(self.heighRadio)
self.heighRadio.setObjectName(u"heighRadio")
self.heighRadio.setMaximumSize(QSize(100, 16777215))
self.horizontalLayout_4.addWidget(self.heighRadio)
- self.widthEdit = QLineEdit(Waifu2xTool)
+ self.widthEdit = QLineEdit(self.scrollAreaWidgetContents)
self.widthEdit.setObjectName(u"widthEdit")
self.widthEdit.setEnabled(False)
self.widthEdit.setMaximumSize(QSize(60, 16777215))
@@ -102,13 +106,13 @@ class Ui_Waifu2xTool(object):
self.horizontalLayout_4.addWidget(self.widthEdit)
- self.label_2 = QLabel(Waifu2xTool)
+ self.label_2 = QLabel(self.scrollAreaWidgetContents)
self.label_2.setObjectName(u"label_2")
self.label_2.setMaximumSize(QSize(20, 16777215))
self.horizontalLayout_4.addWidget(self.label_2)
- self.heighEdit = QLineEdit(Waifu2xTool)
+ self.heighEdit = QLineEdit(self.scrollAreaWidgetContents)
self.heighEdit.setObjectName(u"heighEdit")
self.heighEdit.setEnabled(False)
self.heighEdit.setMaximumSize(QSize(60, 16777215))
@@ -119,89 +123,67 @@ class Ui_Waifu2xTool(object):
self.verticalLayout_2.addLayout(self.horizontalLayout_4)
- self.horizontalLayout_5 = QHBoxLayout()
- self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
- self.label_4 = QLabel(Waifu2xTool)
- self.label_4.setObjectName(u"label_4")
- self.label_4.setMaximumSize(QSize(60, 16777215))
-
- self.horizontalLayout_5.addWidget(self.label_4)
-
- self.noiseCombox = QComboBox(Waifu2xTool)
- self.noiseCombox.addItem("")
- self.noiseCombox.addItem("")
- self.noiseCombox.addItem("")
- self.noiseCombox.addItem("")
- self.noiseCombox.addItem("")
- self.noiseCombox.setObjectName(u"noiseCombox")
- self.noiseCombox.setMinimumSize(QSize(160, 0))
- self.noiseCombox.setMaximumSize(QSize(160, 16777215))
-
- self.horizontalLayout_5.addWidget(self.noiseCombox)
-
-
- self.verticalLayout_2.addLayout(self.horizontalLayout_5)
-
self.horizontalLayout_6 = QHBoxLayout()
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
- self.label_5 = QLabel(Waifu2xTool)
+ self.label_5 = QLabel(self.scrollAreaWidgetContents)
self.label_5.setObjectName(u"label_5")
self.label_5.setMaximumSize(QSize(60, 16777215))
self.horizontalLayout_6.addWidget(self.label_5)
- self.comboBox = QComboBox(Waifu2xTool)
- self.comboBox.addItem("")
- self.comboBox.addItem("")
- self.comboBox.addItem("")
- self.comboBox.setObjectName(u"comboBox")
- self.comboBox.setMinimumSize(QSize(160, 0))
- self.comboBox.setMaximumSize(QSize(160, 16777215))
+ self.modelName = QPushButton(self.scrollAreaWidgetContents)
+ self.modelName.setObjectName(u"modelName")
+ font = QFont()
+ font.setPointSize(8)
+ self.modelName.setFont(font)
- self.horizontalLayout_6.addWidget(self.comboBox)
+ self.horizontalLayout_6.addWidget(self.modelName)
self.verticalLayout_2.addLayout(self.horizontalLayout_6)
self.horizontalLayout_7 = QHBoxLayout()
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
+ self.label_3 = QLabel(self.scrollAreaWidgetContents)
+ self.label_3.setObjectName(u"label_3")
+ self.label_3.setMaximumSize(QSize(60, 16777215))
+
+ self.horizontalLayout_7.addWidget(self.label_3)
+
+ self.fmtComboBox = QComboBox(self.scrollAreaWidgetContents)
+ self.fmtComboBox.addItem("")
+ self.fmtComboBox.addItem("")
+ self.fmtComboBox.addItem("")
+ self.fmtComboBox.addItem("")
+ self.fmtComboBox.addItem("")
+ self.fmtComboBox.addItem("")
+ self.fmtComboBox.setObjectName(u"fmtComboBox")
+
+ self.horizontalLayout_7.addWidget(self.fmtComboBox)
+
self.verticalLayout_2.addLayout(self.horizontalLayout_7)
- self.changeButton = QPushButton(Waifu2xTool)
+ self.changeButton = QPushButton(self.scrollAreaWidgetContents)
self.changeButton.setObjectName(u"changeButton")
self.changeButton.setMaximumSize(QSize(100, 16777215))
- self.verticalLayout_2.addWidget(self.changeButton, 0, Qt.AlignLeft)
+ self.verticalLayout_2.addWidget(self.changeButton, 0, Qt.AlignHCenter)
- self.verticalLayout.addLayout(self.verticalLayout_2)
-
- self.line = QFrame(Waifu2xTool)
- self.line.setObjectName(u"line")
- self.line.setFrameShape(QFrame.VLine)
- self.line.setFrameShadow(QFrame.Sunken)
-
- self.verticalLayout.addWidget(self.line)
-
- self.line_4 = QFrame(Waifu2xTool)
- self.line_4.setObjectName(u"line_4")
- self.line_4.setFrameShape(QFrame.HLine)
- self.line_4.setFrameShadow(QFrame.Sunken)
-
- self.verticalLayout.addWidget(self.line_4)
+ self.verticalLayout_4.addLayout(self.verticalLayout_2)
self.verticalLayout_3 = QVBoxLayout()
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout_8 = QHBoxLayout()
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
- self.label_8 = QLabel(Waifu2xTool)
+ self.label_8 = QLabel(self.scrollAreaWidgetContents)
self.label_8.setObjectName(u"label_8")
self.label_8.setMaximumSize(QSize(60, 16777215))
self.horizontalLayout_8.addWidget(self.label_8)
- self.resolutionLabel = QLabel(Waifu2xTool)
+ self.resolutionLabel = QLabel(self.scrollAreaWidgetContents)
self.resolutionLabel.setObjectName(u"resolutionLabel")
self.resolutionLabel.setMaximumSize(QSize(160, 16777215))
@@ -212,13 +194,13 @@ class Ui_Waifu2xTool(object):
self.horizontalLayout_9 = QHBoxLayout()
self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
- self.label_10 = QLabel(Waifu2xTool)
+ self.label_10 = QLabel(self.scrollAreaWidgetContents)
self.label_10.setObjectName(u"label_10")
self.label_10.setMaximumSize(QSize(60, 16777215))
self.horizontalLayout_9.addWidget(self.label_10)
- self.sizeLabel = QLabel(Waifu2xTool)
+ self.sizeLabel = QLabel(self.scrollAreaWidgetContents)
self.sizeLabel.setObjectName(u"sizeLabel")
self.sizeLabel.setMaximumSize(QSize(160, 16777215))
@@ -229,14 +211,15 @@ class Ui_Waifu2xTool(object):
self.horizontalLayout_11 = QHBoxLayout()
self.horizontalLayout_11.setObjectName(u"horizontalLayout_11")
- self.label_9 = QLabel(Waifu2xTool)
+ self.label_9 = QLabel(self.scrollAreaWidgetContents)
self.label_9.setObjectName(u"label_9")
self.label_9.setMaximumSize(QSize(60, 16777215))
self.horizontalLayout_11.addWidget(self.label_9)
- self.gpuLabel = QLabel(Waifu2xTool)
+ self.gpuLabel = QLabel(self.scrollAreaWidgetContents)
self.gpuLabel.setObjectName(u"gpuLabel")
+ self.gpuLabel.setMaximumSize(QSize(150, 16777215))
self.gpuLabel.setWordWrap(True)
self.horizontalLayout_11.addWidget(self.gpuLabel)
@@ -246,13 +229,13 @@ class Ui_Waifu2xTool(object):
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
- self.label = QLabel(Waifu2xTool)
+ self.label = QLabel(self.scrollAreaWidgetContents)
self.label.setObjectName(u"label")
self.label.setMaximumSize(QSize(60, 16777215))
self.horizontalLayout.addWidget(self.label)
- self.format = QLabel(Waifu2xTool)
+ self.format = QLabel(self.scrollAreaWidgetContents)
self.format.setObjectName(u"format")
self.horizontalLayout.addWidget(self.format)
@@ -262,13 +245,13 @@ class Ui_Waifu2xTool(object):
self.horizontalLayout_10 = QHBoxLayout()
self.horizontalLayout_10.setObjectName(u"horizontalLayout_10")
- self.label_6 = QLabel(Waifu2xTool)
+ self.label_6 = QLabel(self.scrollAreaWidgetContents)
self.label_6.setObjectName(u"label_6")
self.label_6.setMaximumSize(QSize(60, 16777215))
- self.horizontalLayout_10.addWidget(self.label_6)
+ self.horizontalLayout_10.addWidget(self.label_6, 0, Qt.AlignLeft)
- self.tickLabel = QLabel(Waifu2xTool)
+ self.tickLabel = QLabel(self.scrollAreaWidgetContents)
self.tickLabel.setObjectName(u"tickLabel")
self.tickLabel.setMaximumSize(QSize(160, 16777215))
@@ -277,61 +260,56 @@ class Ui_Waifu2xTool(object):
self.verticalLayout_3.addLayout(self.horizontalLayout_10)
- self.oepnButton = QPushButton(Waifu2xTool)
+ self.horizontalLayout_2 = QHBoxLayout()
+ self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
+ self.oepnButton = QPushButton(self.scrollAreaWidgetContents)
self.oepnButton.setObjectName(u"oepnButton")
self.oepnButton.setMaximumSize(QSize(100, 16777215))
- self.verticalLayout_3.addWidget(self.oepnButton, 0, Qt.AlignLeft)
+ self.horizontalLayout_2.addWidget(self.oepnButton)
- self.horizontalLayout_2 = QHBoxLayout()
- self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
-
- self.verticalLayout_3.addLayout(self.horizontalLayout_2)
-
- self.pushButton_3 = QPushButton(Waifu2xTool)
- self.pushButton_3.setObjectName(u"pushButton_3")
- self.pushButton_3.setMaximumSize(QSize(100, 16777215))
-
- self.verticalLayout_3.addWidget(self.pushButton_3, 0, Qt.AlignLeft)
-
- self.pushButton = QPushButton(Waifu2xTool)
- self.pushButton.setObjectName(u"pushButton")
- self.pushButton.setMaximumSize(QSize(100, 16777215))
-
- self.verticalLayout_3.addWidget(self.pushButton, 0, Qt.AlignLeft)
-
- self.saveButton = QPushButton(Waifu2xTool)
+ self.saveButton = QPushButton(self.scrollAreaWidgetContents)
self.saveButton.setObjectName(u"saveButton")
self.saveButton.setMaximumSize(QSize(100, 16777215))
- self.verticalLayout_3.addWidget(self.saveButton, 0, Qt.AlignLeft)
+ self.horizontalLayout_2.addWidget(self.saveButton)
- self.headButton = QPushButton(Waifu2xTool)
+
+ self.verticalLayout_3.addLayout(self.horizontalLayout_2)
+
+ self.horizontalLayout_5 = QHBoxLayout()
+ self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
+ self.pushButton = QPushButton(self.scrollAreaWidgetContents)
+ self.pushButton.setObjectName(u"pushButton")
+ self.pushButton.setMaximumSize(QSize(100, 16777215))
+
+ self.horizontalLayout_5.addWidget(self.pushButton)
+
+ self.pushButton_3 = QPushButton(self.scrollAreaWidgetContents)
+ self.pushButton_3.setObjectName(u"pushButton_3")
+ self.pushButton_3.setMaximumSize(QSize(100, 16777215))
+
+ self.horizontalLayout_5.addWidget(self.pushButton_3)
+
+
+ self.verticalLayout_3.addLayout(self.horizontalLayout_5)
+
+ self.headButton = QPushButton(self.scrollAreaWidgetContents)
self.headButton.setObjectName(u"headButton")
self.headButton.setMaximumSize(QSize(100, 16777215))
self.verticalLayout_3.addWidget(self.headButton, 0, Qt.AlignLeft)
- self.verticalLayout.addLayout(self.verticalLayout_3)
-
- self.line_6 = QFrame(Waifu2xTool)
- self.line_6.setObjectName(u"line_6")
- self.line_6.setFrameShape(QFrame.HLine)
- self.line_6.setFrameShadow(QFrame.Sunken)
-
- self.verticalLayout.addWidget(self.line_6)
+ self.verticalLayout_4.addLayout(self.verticalLayout_3)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
- self.verticalLayout.addItem(self.verticalSpacer)
+ self.verticalLayout_4.addItem(self.verticalSpacer)
- self.line_2 = QFrame(Waifu2xTool)
- self.line_2.setObjectName(u"line_2")
- self.line_2.setFrameShape(QFrame.VLine)
- self.line_2.setFrameShadow(QFrame.Sunken)
+ self.scrollArea.setWidget(self.scrollAreaWidgetContents)
- self.verticalLayout.addWidget(self.line_2)
+ self.verticalLayout.addWidget(self.scrollArea)
self.gridLayout.addLayout(self.verticalLayout, 0, 1, 1, 1)
@@ -349,9 +327,7 @@ class Ui_Waifu2xTool(object):
self.pushButton.clicked.connect(Waifu2xTool.AddScalePic)
self.scaleEdit.textChanged.connect(Waifu2xTool.CheckScaleRadio)
self.scaleRadio.clicked.connect(Waifu2xTool.CheckScaleRadio)
- self.comboBox.currentIndexChanged.connect(Waifu2xTool.ChangeModel)
self.changeButton.clicked.connect(Waifu2xTool.StartWaifu2x)
- self.noiseCombox.currentIndexChanged.connect(Waifu2xTool.CheckScaleRadio)
self.headButton.clicked.connect(Waifu2xTool.SetHead)
QMetaObject.connectSlotsByName(Waifu2xTool)
@@ -368,17 +344,15 @@ class Ui_Waifu2xTool(object):
self.scaleEdit.setText(QCoreApplication.translate("Waifu2xTool", u"2", None))
self.heighRadio.setText(QCoreApplication.translate("Waifu2xTool", u"\u56fa\u5b9a\u957f\u5bbd", None))
self.label_2.setText(QCoreApplication.translate("Waifu2xTool", u"X", None))
- self.label_4.setText(QCoreApplication.translate("Waifu2xTool", u"\u964d\u566a\uff1a", None))
- self.noiseCombox.setItemText(0, QCoreApplication.translate("Waifu2xTool", u"3", None))
- self.noiseCombox.setItemText(1, QCoreApplication.translate("Waifu2xTool", u"2", None))
- self.noiseCombox.setItemText(2, QCoreApplication.translate("Waifu2xTool", u"1", None))
- self.noiseCombox.setItemText(3, QCoreApplication.translate("Waifu2xTool", u"0", None))
- self.noiseCombox.setItemText(4, QCoreApplication.translate("Waifu2xTool", u"-1", None))
-
self.label_5.setText(QCoreApplication.translate("Waifu2xTool", u"\u6a21\u578b\uff1a", None))
- self.comboBox.setItemText(0, QCoreApplication.translate("Waifu2xTool", u"cunet", None))
- self.comboBox.setItemText(1, QCoreApplication.translate("Waifu2xTool", u"photo", None))
- self.comboBox.setItemText(2, QCoreApplication.translate("Waifu2xTool", u"anime_style_art_rgb", None))
+ self.modelName.setText("")
+ self.label_3.setText(QCoreApplication.translate("Waifu2xTool", u"\u683c\u5f0f\uff1a", None))
+ self.fmtComboBox.setItemText(0, QCoreApplication.translate("Waifu2xTool", u"\u81ea\u52a8", None))
+ self.fmtComboBox.setItemText(1, QCoreApplication.translate("Waifu2xTool", u"JPG", None))
+ self.fmtComboBox.setItemText(2, QCoreApplication.translate("Waifu2xTool", u"PNG", None))
+ self.fmtComboBox.setItemText(3, QCoreApplication.translate("Waifu2xTool", u"BMP", None))
+ self.fmtComboBox.setItemText(4, QCoreApplication.translate("Waifu2xTool", u"WEBP", None))
+ self.fmtComboBox.setItemText(5, QCoreApplication.translate("Waifu2xTool", u"GIF", None))
self.changeButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u8f6c\u6362", None))
self.label_8.setText(QCoreApplication.translate("Waifu2xTool", u"\u5206\u8fa8\u7387\uff1a", None))
@@ -392,9 +366,9 @@ class Ui_Waifu2xTool(object):
self.label_6.setText(QCoreApplication.translate("Waifu2xTool", u"\u8017\u65f6\uff1a", None))
self.tickLabel.setText("")
self.oepnButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u6253\u5f00\u56fe\u7247", None))
- self.pushButton_3.setText(QCoreApplication.translate("Waifu2xTool", u"\u7f29\u5c0f", None))
- self.pushButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u653e\u5927", None))
self.saveButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u4fdd\u5b58\u56fe\u7247", None))
- self.headButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u8bbe\u7f6e\u5934\u50cf", None))
+ self.pushButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u653e\u5927", None))
+ self.pushButton_3.setText(QCoreApplication.translate("Waifu2xTool", u"\u7f29\u5c0f", None))
+ self.headButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u8bbe\u7f6e\u4e3a\u5934\u50cf", None))
# retranslateUi
diff --git a/src/qt_owner.py b/src/qt_owner.py
index 8dd9ebd..82161a8 100644
--- a/src/qt_owner.py
+++ b/src/qt_owner.py
@@ -168,7 +168,14 @@ class QtOwner(Singleton):
data = f.readAll()
f.close()
return bytes(data)
-
+
+ def OpenSrSelectModel(self, curModelName, callBack):
+ from view.setting.setting_sr_select_view import SettingSrSelectView
+ loginView = SettingSrSelectView(QtOwner().owner, curModelName)
+ loginView.show()
+ loginView.Close.connect(callBack)
+ return
+
def AddLocalHistory(self, bookId):
self.owner.localReadView.AddDataToDB(bookId)
@@ -269,7 +276,11 @@ class QtOwner(Singleton):
# self.owner.subCommentView.SetOpenEvent(commentId, widget)
arg = {"bookId": bookId}
self.owner.SwitchWidget(self.owner.bookInfoView, **arg)
-
+
+ def OpenSomeDownload(self, bookList=None):
+ arg = {"bookList": bookList}
+ self.owner.SwitchWidget(self.owner.downloadSomeView, **arg)
+
def OpenLocalBook(self, bookId):
self.owner.localReadView.OpenLocalBook(bookId)
diff --git a/src/requirements.txt b/src/requirements.txt
index fe0f12a..7c6ff3a 100644
--- a/src/requirements.txt
+++ b/src/requirements.txt
@@ -2,12 +2,9 @@ PySide6==6.2.4
websocket-client==0.59.0
requests==2.26.0
urllib3==1.25.11
-
pillow==8.3.2
-waifu2x-vulkan==1.1.6
Pysocks==1.7.1
natsort==8.2.0
webdavclient3==3.14.6
tqdm==4.66.4
-pysmb==1.2.9.1
-# pywin32==302
\ No newline at end of file
+pysmb==1.2.9.1
\ No newline at end of file
diff --git a/src/requirements_macos.txt b/src/requirements_macos.txt
index 4eb9af7..e9484f4 100644
--- a/src/requirements_macos.txt
+++ b/src/requirements_macos.txt
@@ -4,7 +4,6 @@ requests==2.26.0
urllib3==1.25.11
pillow==8.3.2
-waifu2x-vulkan==1.1.6
Pysocks==1.7.1
natsort==8.2.0
webdavclient3==3.14.6
diff --git a/src/requirements_win7.txt b/src/requirements_win7.txt
index 4541528..5c07321 100644
--- a/src/requirements_win7.txt
+++ b/src/requirements_win7.txt
@@ -1,11 +1,11 @@
PySide6==6.1.3
websocket-client==0.59.0
requests==2.26.0
+urllib3==1.25.11
+
pillow==8.3.2
-waifu2x-vulkan==1.1.6
Pysocks==1.7.1
natsort==8.2.0
webdavclient3==3.14.6
tqdm==4.66.4
-pysmb==1.2.9.1
-# pywin32==302
\ No newline at end of file
+pysmb==1.2.9.1
\ No newline at end of file
diff --git a/src/server/sql_server.py b/src/server/sql_server.py
index fdaa27e..597308a 100644
--- a/src/server/sql_server.py
+++ b/src/server/sql_server.py
@@ -534,9 +534,9 @@ class SqlServer(Singleton):
data2 = ""
for word in exclude:
whereSql = SqlServer._GetSearchWhere(word, isTitle, isAuthor, isDes, isTag, isCategory, isCreator, False)
- data2 += "{} or ".format(whereSql)
+ data2 += "{} and ".format(whereSql)
if data2:
- data += "and ({})".format(data2.strip("or "))
+ data += "and ({})".format(data2.strip("and "))
sql2Data = data
diff --git a/src/start.py b/src/start.py
index 0e3ab23..480cd5a 100644
--- a/src/start.py
+++ b/src/start.py
@@ -22,8 +22,13 @@ if sys.platform == 'darwin':
# sys.path.insert(0, "lib")
try:
- from waifu2x_vulkan import waifu2x_vulkan
+ from sr_ncnn_vulkan import sr_ncnn_vulkan as sr
config.CanWaifu2x = True
+except ModuleNotFoundError as es:
+ config.CanWaifu2x = False
+ config.CloseWaifu2x = True
+ if hasattr(es, "msg"):
+ config.ErrorMsg = es.msg
except Exception as es:
config.CanWaifu2x = False
if hasattr(es, "msg"):
@@ -56,7 +61,7 @@ if __name__ == "__main__":
showError(traceback.format_exc(), app)
if config.CanWaifu2x:
- waifu2x_vulkan.stop()
+ sr.stop()
sys.exit(-111)
app = QtWidgets.QApplication(sys.argv) # 建立application对象
@@ -89,13 +94,13 @@ if __name__ == "__main__":
Log.Error(es)
showError(traceback.format_exc(), app)
if config.CanWaifu2x:
- waifu2x_vulkan.stop()
+ sr.stop()
sys.exit(-111)
sts = app.exec()
socket.close()
main.Close()
if config.CanWaifu2x:
- waifu2x_vulkan.stop()
+ sr.stop()
time.sleep(2)
print(sts)
sys.exit(sts) # 运行程序
diff --git a/src/task/task_waifu2x.py b/src/task/task_waifu2x.py
index f103713..3d69db6 100644
--- a/src/task/task_waifu2x.py
+++ b/src/task/task_waifu2x.py
@@ -103,18 +103,17 @@ class TaskWaifu2x(TaskBase):
err = ""
if config.CanWaifu2x:
- from waifu2x_vulkan import waifu2x_vulkan
+ from sr_ncnn_vulkan import sr_ncnn_vulkan as sr
scale = task.model.get("scale", 0)
- # mat = task.model.get("format", "jpg")
+ mat = task.model.get("format", "")
tileSize = Setting.Waifu2xTileSize.GetIndexV()
if scale <= 0:
- sts = waifu2x_vulkan.add(task.imgData, task.model.get('model', 0), task.taskId, task.model.get("width", 0),
- task.model.get("high", 0), tileSize=tileSize )
+ sts = sr.add(task.imgData, task.model.get('model', 0), task.taskId, task.model.get("width", 0), task.model.get("high", 0), format=mat, tileSize=tileSize)
else:
- sts = waifu2x_vulkan.add(task.imgData, task.model.get('model', 0), task.taskId, scale, tileSize=tileSize)
+ sts = sr.add(task.imgData, task.model.get('model', 0), task.taskId, scale, format=mat, tileSize=tileSize)
if sts <= 0:
- err = waifu2x_vulkan.getLastError()
+ err = sr.getLastError()
else:
sts = -1
@@ -134,8 +133,8 @@ class TaskWaifu2x(TaskBase):
if not config.CanWaifu2x:
time.sleep(100)
return None
- from waifu2x_vulkan import waifu2x_vulkan
- return waifu2x_vulkan.load(0)
+ from sr_ncnn_vulkan import sr_ncnn_vulkan as sr
+ return sr.load(0)
def RunLoad2(self):
while True:
@@ -143,7 +142,7 @@ class TaskWaifu2x(TaskBase):
if not info:
break
t1 = CTime()
- data, convertId, taskId, tick = info
+ data, format, taskId, tick = info
info = self.tasks.get(taskId)
tick = round(tick, 2)
if not info:
@@ -155,7 +154,7 @@ class TaskWaifu2x(TaskBase):
if lenData <= 0:
info.status = Status.FileFormatError
Log.Warn("convert error, taskId: {}, dataLen:{}, sts:{} tick:{}".format(str(taskId), lenData,
- str(convertId),
+ str(format),
str(tick)))
assert isinstance(info, QConvertTask)
info.saveData = data
@@ -236,10 +235,10 @@ class TaskWaifu2x(TaskBase):
for taskId in taskIds:
if taskId in self.tasks:
del self.tasks[taskId]
- # Log.Info("cancel wait convert taskId, {}".format(taskIds))
+ Log.Info("cancel wait convert taskId, {}".format(taskIds))
if config.CanWaifu2x:
- from waifu2x_vulkan import waifu2x_vulkan
- waifu2x_vulkan.removeWaitProc(list(taskIds))
+ from sr_ncnn_vulkan import sr_ncnn_vulkan as sr
+ sr.removeWaitProc(list(taskIds))
def Cancel(self, cleanFlag):
taskIds = self.flagToIds.get(cleanFlag, set())
@@ -253,6 +252,6 @@ class TaskWaifu2x(TaskBase):
Log.Info("cancel convert taskId, {}".format(removeIds))
self.flagToIds.pop(cleanFlag)
if config.CanWaifu2x:
- from waifu2x_vulkan import waifu2x_vulkan
- waifu2x_vulkan.remove(removeIds)
+ from sr_ncnn_vulkan import sr_ncnn_vulkan as sr
+ sr.remove(removeIds)
diff --git a/src/task/upload_webdav.py b/src/task/upload_webdav.py
index e702781..243f145 100644
--- a/src/task/upload_webdav.py
+++ b/src/task/upload_webdav.py
@@ -69,7 +69,12 @@ class WebdavClient(UpLoadBase):
def Init(self, nasInfo):
from view.nas.nas_item import NasInfoItem
assert isinstance(nasInfo, NasInfoItem)
- self.address = nasInfo.address + ":" + str(nasInfo.port)
+ from tools.tool import ToolUtil
+ if nasInfo.port:
+ host = ToolUtil.GetUrlHost(nasInfo.address)
+ self.address = nasInfo.address.replace(host, host + ":" + str(nasInfo.port))
+ else:
+ self.address = nasInfo.address
self.password = nasInfo.passwd
self.username = nasInfo.user
@@ -122,14 +127,31 @@ class WebdavClient(UpLoadBase):
return Str.CvNotSupport
elif isinstance(es, Unauthorized):
return Str.CvAuthError
+ elif hasattr(es, "exception") and isinstance(es.exception, requests.exceptions.ConnectTimeout):
+ return Status.ConnectErr
+ elif hasattr(es, "exception") and isinstance(es.exception, requests.exceptions.ReadTimeout):
+ return Status.TimeOut
+ elif hasattr(es, "exception") and isinstance(es.exception, requests.exceptions.SSLError):
+ if "WSAECONNRESET" in es.__repr__():
+ return Status.ResetErr
+ else:
+ return Status.SSLErr
+ elif hasattr(es, "exception") and isinstance(es.exception, requests.exceptions.ProxyError):
+ return Status.ProxyError
+ elif hasattr(es, "exception") and isinstance(es.exception, ConnectionResetError):
+ return Status.ResetErr
else:
return Str.Error
if __name__ == "__main__":
- a = WebdavClient()
- a.address = "http://101.35.89.244:16000"
- a.username = "tonquer"
- a.password = "123"
- a.Init()
- a.Upload("qt-unified-windows-x64-4.7.0-online.exe", "test")
\ No newline at end of file
+ w = WebdavClient()
+ from view.nas.nas_item import NasInfoItem
+ a = NasInfoItem()
+ a.address = "https://app.koofr.net/dav/onedrive"
+ a.user = "test"
+ a.passwd = "test"
+ a.port = 0
+ w.Init(a)
+ w.Connect()
+ w.CheckAndCreateDir("test")
\ No newline at end of file
diff --git a/src/tools/str.py b/src/tools/str.py
index c9abfc0..f2cf96c 100644
--- a/src/tools/str.py
+++ b/src/tools/str.py
@@ -82,7 +82,7 @@ class Str:
NetNas = 5000 # 网络存储
CvSuccess = 5001 # "完成"
CvWaitDown = 5002 # 等待下载
- CvWaifu2x = 5003 # 等待Waifu2x
+ CvWaifu2x = 5003 # 等待图片超分
CvCompose = 5004 # 正在打包
CvUpload = 5005 # 正在上传
CvError = 5006 # 出错了
@@ -90,7 +90,7 @@ class Str:
CvLink = 5008 # 连接中
CvNotNet = 5009 # 没有网络存储
CvSpace = 5010 # 空
- CvZipError = 5011 # 打包出错了
+ CvZipError = 5010 # 打包出错了
CvAuthError = 5101 # 验证失败
CvFileNotFound = 5102 # 本地文件未找到
@@ -191,7 +191,7 @@ class Str:
Open = 87 # 打开
LookCover = 88 # 查看封面
ReDownloadCover = 89 # 重下封面
- Waifu2xConvert = 90 # Waifu2x转换
+ Waifu2xConvert = 90 # 图片超分
CopyTitle = 91 # 复制标题
Download = 92 # 下载
Delete = 93 # 删除
@@ -207,7 +207,7 @@ class Str:
Looked = 103 # 看过
PressEnter = 104 # 按Enter发送消息
PressCtrlEnter = 105 # 按Ctrl+Enter发送消息
- DelWaifu2xConvert = 106 # 取消Waifu2x转换
+ DelWaifu2xConvert = 106 # 取消图片超分
NeedResetSave = 107 # 需要重启保存
CheckUp = 108 # 检查更新
DailyUpdated = 109 # 今日已更新
@@ -336,7 +336,7 @@ class Str:
cls.strDict[cls.NetNas] = QCoreApplication.translate("cls.obj", "网络存储", None)
cls.strDict[cls.CvSuccess] = QCoreApplication.translate("cls.obj", "完成", None)
cls.strDict[cls.CvWaitDown] = QCoreApplication.translate("cls.obj", "等待下载", None)
- cls.strDict[cls.CvWaifu2x] = QCoreApplication.translate("cls.obj", "等待Waifu2x", None)
+ cls.strDict[cls.CvWaifu2x] = QCoreApplication.translate("cls.obj", "等待图片超分", None)
cls.strDict[cls.CvCompose] = QCoreApplication.translate("cls.obj", "正在打包", None)
cls.strDict[cls.CvUpload] = QCoreApplication.translate("cls.obj", "正在上传", None)
cls.strDict[cls.CvError] = QCoreApplication.translate("cls.obj", "出错了", None)
@@ -383,7 +383,7 @@ class Str:
cls.strDict[cls.Size] = QCoreApplication.translate("cls.obj", "大小", None)
cls.strDict[cls.State] = QCoreApplication.translate("cls.obj", "状态", None)
cls.strDict[cls.DownloadNot] = QCoreApplication.translate("cls.obj", "下载未完成", None)
- cls.strDict[cls.NotRecommendWaifu2x] = QCoreApplication.translate("cls.obj", "Waifu2x当前为CPU模式,看图模式下不推荐开启", None)
+ cls.strDict[cls.NotRecommendWaifu2x] = QCoreApplication.translate("cls.obj", "图片超分当前为CPU模式,看图模式下不推荐开启", None)
cls.strDict[cls.StopAutoScroll] = QCoreApplication.translate("cls.obj", "自动滚动/翻页已停止", None)
cls.strDict[cls.LastPage] = QCoreApplication.translate("cls.obj", "上一页", None)
cls.strDict[cls.NextPage] = QCoreApplication.translate("cls.obj", "下一页", None)
@@ -436,7 +436,7 @@ class Str:
cls.strDict[cls.Open] = QCoreApplication.translate("cls.obj", "打开", None)
cls.strDict[cls.LookCover] = QCoreApplication.translate("cls.obj", "查看封面", None)
cls.strDict[cls.ReDownloadCover] = QCoreApplication.translate("cls.obj", "重下封面", None)
- cls.strDict[cls.Waifu2xConvert] = QCoreApplication.translate("cls.obj", "Waifu2x转换", None)
+ cls.strDict[cls.Waifu2xConvert] = QCoreApplication.translate("cls.obj", "图片超分", None)
cls.strDict[cls.CopyTitle] = QCoreApplication.translate("cls.obj", "复制标题", None)
cls.strDict[cls.Download] = QCoreApplication.translate("cls.obj", "下载", None)
cls.strDict[cls.Delete] = QCoreApplication.translate("cls.obj", "删除", None)
@@ -452,7 +452,7 @@ class Str:
cls.strDict[cls.Looked] = QCoreApplication.translate("cls.obj", "看过", None)
cls.strDict[cls.PressEnter] = QCoreApplication.translate("cls.obj", "按Enter发送消息", None)
cls.strDict[cls.PressCtrlEnter] = QCoreApplication.translate("cls.obj", "按Ctrl+Enter发送消息", None)
- cls.strDict[cls.DelWaifu2xConvert] = QCoreApplication.translate("cls.obj", "取消Waifu2x转换", None)
+ cls.strDict[cls.DelWaifu2xConvert] = QCoreApplication.translate("cls.obj", "取消图片超分", None)
cls.strDict[cls.NeedResetSave] = QCoreApplication.translate("cls.obj", "需要重启保存", None)
cls.strDict[cls.CheckUp] = QCoreApplication.translate("cls.obj", "检查更新", None)
cls.strDict[cls.DailyUpdated] = QCoreApplication.translate("cls.obj", "今日已更新", None)
@@ -478,10 +478,10 @@ class Str:
cls.strDict[cls.MyComment] = QCoreApplication.translate("cls.obj", "我的评论", None)
cls.strDict[cls.LoginOut] = QCoreApplication.translate("cls.obj", "登出", None)
cls.strDict[cls.Sock5Error] = QCoreApplication.translate("cls.obj", "Sock5设置出错", None)
- cls.strDict[cls.OpenAutoWaifu2x] = QCoreApplication.translate("cls.obj", "开启自动waifu2x", None)
- cls.strDict[cls.CloseAutoWaifu2x] = QCoreApplication.translate("cls.obj", "关闭自动waifu2x", None)
- cls.strDict[cls.OpenCurWaifu2x] = QCoreApplication.translate("cls.obj", "开启本张图waifu2x", None)
- cls.strDict[cls.CloseCurWaifu2x] = QCoreApplication.translate("cls.obj", "关闭本张图waifu2x", None)
+ cls.strDict[cls.OpenAutoWaifu2x] = QCoreApplication.translate("cls.obj", "开启自动超分", None)
+ cls.strDict[cls.CloseAutoWaifu2x] = QCoreApplication.translate("cls.obj", "关闭自动超分", None)
+ cls.strDict[cls.OpenCurWaifu2x] = QCoreApplication.translate("cls.obj", "开启本张图超分", None)
+ cls.strDict[cls.CloseCurWaifu2x] = QCoreApplication.translate("cls.obj", "关闭本张图超分", None)
cls.strDict[cls.RightLeftDouble2] = QCoreApplication.translate("cls.obj", "右左双页(滚轮正序)", None)
cls.strDict[cls.Copy] = QCoreApplication.translate("cls.obj", "复制", None)
cls.strDict[cls.CopyPicture] = QCoreApplication.translate("cls.obj", "复制图片到剪贴板", None)
diff --git a/src/tools/tool.py b/src/tools/tool.py
index 3e8b46d..bacb2f4 100644
--- a/src/tools/tool.py
+++ b/src/tools/tool.py
@@ -291,7 +291,7 @@ class ToolUtil(object):
@staticmethod
def GetLookScaleModel(category, w, h, mat="jpg"):
- data = ToolUtil.GetModelByIndex(Setting.LookNoise.value, Setting.LookScale.value, ToolUtil.GetLookModel(category), mat)
+ data = ToolUtil.GetModelByIndex(Setting.LookModelName.value, Setting.LookScale.value, mat)
# 放大倍数不能过大,如果图片超过4k了,QImage无法显示出来,bug
if min(w, h) > 3000:
data["scale"] = 1
@@ -305,7 +305,7 @@ class ToolUtil(object):
# 条漫不放大
if not config.CanWaifu2x:
return {}
- return ToolUtil.GetModelByIndex(Setting.DownloadNoise.value, Setting.DownloadScale.value, Setting.DownloadModel.value, mat)
+ return ToolUtil.GetModelByIndex(Setting.DownloadModelName.value, Setting.DownloadScale.value, mat)
@staticmethod
def GetAnimationFormat(data):
@@ -348,55 +348,68 @@ class ToolUtil(object):
Log.Error(es)
return 0, 0, "jpg", False
- @staticmethod
- def GetLookModel(category):
- if Setting.LookModel.value == 0:
- if "Cosplay" in category or "cosplay" in category or "CosPlay" in category or "COSPLAY" in category:
- return 2
- return 3
- else:
- return Setting.LookModel.value
+ # @staticmethod
+ # def GetLookModel(category):
+ # if Setting.LookModel.value == 0:
+ # if "Cosplay" in category or "cosplay" in category or "CosPlay" in category or "COSPLAY" in category:
+ # return 2
+ # return 3
+ # else:
+ # return Setting.LookModel.value
+
+ # @staticmethod
+ # def GetModelAndScale(model):
+ # if not model:
+ # return "cunet", 1, 1
+ # index = model.get('index', 0)
+ # scale = model.get('scale', 0)
+ # noise = model.get('noise', 0)
+ # if index == 0:
+ # model = "anime_style_art_rgb"
+ # elif index == 1:
+ # model = "cunet"
+ # elif index == 2:
+ # model = "photo"
+ # else:
+ # model = "anime_style_art_rgb"
+ # return model, noise, scale
@staticmethod
- def GetModelAndScale(model):
- if not model:
- return "cunet", 1, 1
- index = model.get('index', 0)
- scale = model.get('scale', 0)
- noise = model.get('noise', 0)
- if index == 0:
- model = "anime_style_art_rgb"
- elif index == 1:
- model = "cunet"
- elif index == 2:
- model = "photo"
- else:
- model = "anime_style_art_rgb"
- return model, noise, scale
-
- @staticmethod
- def GetModelByIndex(noise, scale, index, mat="jpg"):
+ def GetModelByIndex(modelName, scale, mat="jpg"):
if not config.CanWaifu2x:
return {}
- if noise < 0:
- noise = 3
- data = {"format": mat, "noise": noise, "scale": scale, "index": index}
- from waifu2x_vulkan import waifu2x_vulkan
- if index == 0:
- data["model"] = getattr(waifu2x_vulkan, "MODEL_ANIME_STYLE_ART_RGB_NOISE"+str(noise))
- elif index == 1:
- data["model"] = getattr(waifu2x_vulkan, "MODEL_CUNET_NOISE"+str(noise))
- elif index == 2:
- data["model"] = getattr(waifu2x_vulkan, "MODEL_PHOTO_NOISE" + str(noise))
- elif index == 3:
- data["model"] = getattr(waifu2x_vulkan, "MODEL_ANIME_STYLE_ART_RGB_NOISE"+str(noise))
- else:
- data["model"] = getattr(waifu2x_vulkan, "MODEL_CUNET_NOISE"+str(noise))
+ data = {"scale": scale}
+ from sr_ncnn_vulkan import sr_ncnn_vulkan as sr
+ data["model"] = getattr(sr, modelName, 0)
+ data["model_name"] = modelName
return data
-
+
+ @staticmethod
+ def GetShowModelName(name):
+ if "WAIFU2X_CUNET" in name:
+ return "Waifu2x(cunet)"
+ elif "WAIFU2X_ANIME" in name:
+ return "Waifu2x(anime)"
+ elif "WAIFU2X_PHOTO" in name:
+ return "Waifu2x(photo)"
+ elif "REALCUGAN_PRO" in name:
+ return "Realcugan(pro)"
+ elif "REALCUGAN_SE" in name:
+ return "Realcugan(se)"
+ elif "REALSR" in name:
+ return "RealSR"
+ elif "REALESRGAN_X4PLUSANIME" in name:
+ return "X4plusAnime"
+ elif "REALESRGAN_X4PLUS" in name:
+ return "X4Plus"
+ elif "REALESRGAN_ANIMAVIDEOV3" in name:
+ return "AnimaVideoV3"
+ return name
+
@staticmethod
def GetCanSaveName(name):
- return re.sub('[\\\/:*?"<>|\0\r\n]', '', name).rstrip(".").strip(" ")
+ # 限制文件夹名称为255/3的长度
+ return str(re.sub('[\\\/:*?"<>|\0\r\n]', '', name).rstrip(".").strip(" "))[:254//3-1]
@staticmethod
def LoadCachePicture(filePath):
diff --git a/src/view/download/download_view.py b/src/view/download/download_view.py
index ae4f802..afbef22 100644
--- a/src/view/download/download_view.py
+++ b/src/view/download/download_view.py
@@ -14,6 +14,7 @@ from interface.ui_download import Ui_Download
from qt_owner import QtOwner
from server.sql_server import SqlServer
from task.qt_task import QtTaskBase
+from tools.langconv import Converter
from tools.book import BookMgr, Book
from tools.log import Log
from tools.status import Status
@@ -84,6 +85,9 @@ class DownloadView(QtWidgets.QWidget, Ui_Download, DownloadStatus):
# self.tableWidget.setColumnWidth(0, 40)
print(self.width())
self.tableWidget.setColumnWidth(1, 300)
+ self.comboBox.currentIndexChanged.connect(self.CheckHideItem)
+ self.lineEdit.textChanged.connect(self.SearchTextChange)
+ self.searchText = ""
# 修复下数据
def RepairData(self, task):
@@ -256,7 +260,8 @@ class DownloadView(QtWidgets.QWidget, Ui_Download, DownloadStatus):
def UpdateTableItem(self, info):
assert isinstance(info, DownloadItem)
-
+ if info.tableRow < 0:
+ return
localTime = time.localtime(info.tick)
strTime = time.strftime("%Y-%m-%d %H:%M:%S", localTime)
@@ -305,7 +310,8 @@ class DownloadView(QtWidgets.QWidget, Ui_Download, DownloadStatus):
if task in self.convertingList:
self.convertingList.remove(task)
self.downloadDict.pop(bookId)
- self.tableWidget.removeRow(task.tableRow)
+ if task.tableRow >= 0:
+ self.tableWidget.removeRow(task.tableRow)
self.db.DelDownloadDB(bookId)
def UpdateTableRow(self):
@@ -682,3 +688,42 @@ class DownloadView(QtWidgets.QWidget, Ui_Download, DownloadStatus):
reDownload.append(download)
for download in reDownload:
self.SetNewStatus(download, DownloadItem.Waiting)
+
+ def SearchTextChange(self, text):
+ self.searchText = Converter('zh-hans').convert(text)
+ self.CheckHideItem()
+
+ def CheckHideItem(self):
+ sortId = self.comboBox.currentIndex()
+ count = self.tableWidget.rowCount()
+ for i in range(count):
+ bookId = self.tableWidget.item(i, 0).text()
+ info = self.downloadDict.get(bookId)
+ if info:
+ assert isinstance(info, DownloadItem)
+ isFind = False
+ if self.searchText:
+ if self.searchText in str(info.bookId):
+ isFind = True
+ if self.searchText in Converter('zh-hans').convert(info.title):
+ isFind = True
+ if self.searchText in Converter('zh-hans').convert(info.author):
+ isFind = True
+ else:
+ isFind = True
+
+ if sortId == 0:
+ if isFind:
+ self.tableWidget.setRowHidden(i, False)
+ else:
+ self.tableWidget.setRowHidden(i, True)
+ elif sortId == 1:
+ if info.status == DownloadItem.Success or not isFind:
+ self.tableWidget.setRowHidden(i, True)
+ else:
+ self.tableWidget.setRowHidden(i, False)
+ elif sortId == 2:
+ if info.status == DownloadItem.Success and isFind:
+ self.tableWidget.setRowHidden(i, False)
+ else:
+ self.tableWidget.setRowHidden(i, True)
\ No newline at end of file
diff --git a/src/view/help/help_view.py b/src/view/help/help_view.py
index baab04c..6bcdaba 100644
--- a/src/view/help/help_view.py
+++ b/src/view/help/help_view.py
@@ -59,12 +59,14 @@ class HelpView(QWidget, Ui_Help, QtTaskBase):
self.updateButton.clicked.connect(self.OpenUpdateUrl)
self.preCheckBox.setChecked(bool(Setting.IsPreUpdate.value))
self.preCheckBox.clicked.connect(self.SwitchCheckPre)
+ self.configVer.setText("{}({})".format(GlobalConfig.Ver.value, GlobalConfig.VerTime.value))
def retranslateUi(self, Help):
Ui_Help.retranslateUi(self, Help)
self.version.setText(config.RealVersion)
self.upTimeLabel.setText(config.TimeVersion)
self.waifu2x.setText(config.Waifu2xVersion)
+ self.configVer.setText("{}({})".format(GlobalConfig.Ver.value, GlobalConfig.VerTime.value))
def SwitchCheckPre(self):
Setting.IsPreUpdate.SetValue(int(self.preCheckBox.isChecked()))
@@ -139,6 +141,7 @@ class HelpView(QWidget, Ui_Help, QtTaskBase):
return
def SwitchCurrent(self, **kwargs):
+ self.configVer.setText("{}({})".format(GlobalConfig.Ver.value, GlobalConfig.VerTime.value))
self.UpdateDbInfo()
return
diff --git a/src/view/info/book_info_view.py b/src/view/info/book_info_view.py
index 54051c1..3760a82 100644
--- a/src/view/info/book_info_view.py
+++ b/src/view/info/book_info_view.py
@@ -321,7 +321,7 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
if Setting.CoverIsOpenWaifu.value:
w, h, mat,_ = ToolUtil.GetPictureSize(self.pictureData)
if max(w, h) <= Setting.CoverMaxNum.value:
- model = ToolUtil.GetModelByIndex(Setting.CoverLookNoise.value, Setting.CoverLookScale.value, Setting.CoverLookModel.value, mat)
+ model = ToolUtil.GetModelByIndex(Setting.CoverLookModelName.value, Setting.CoverLookScale.value, mat)
self.AddConvertTask(self.path, self.pictureData, model, self.Waifu2xPictureBack)
else:
self.picture.setText(Str.GetStr(status))
diff --git a/src/view/main/main_view.py b/src/view/main/main_view.py
index 4ce4d97..89dc859 100644
--- a/src/view/main/main_view.py
+++ b/src/view/main/main_view.py
@@ -61,6 +61,9 @@ class MainView(Main, QtTaskBase):
self.setAttribute(Qt.WA_StyledBackground, True)
self.loadingDialog = LoadingDialog(self)
+ self.navigationWidget.helpButton.click()
+ self.subStackWidget.setCurrentIndex(self.subStackWidget.indexOf(self.helpView))
+
self.__initWidget()
# 窗口切换相关
@@ -71,7 +74,7 @@ class MainView(Main, QtTaskBase):
self.menuButton.clicked.connect(self.CheckShowMenu)
self.UpdateTabBar()
- self.subStackWidget.setCurrentIndex(0)
+ # self.subStackWidget.setCurrentIndex(0)
self.settingView.LoadSetting()
GlobalConfig.LoadSetting()
@@ -167,10 +170,9 @@ class MainView(Main, QtTaskBase):
self.nasView.Init()
self.InitApiProxy()
if config.CanWaifu2x:
- from waifu2x_vulkan import waifu2x_vulkan
-
- stat = waifu2x_vulkan.init()
- waifu2x_vulkan.setDebug(True)
+ from sr_ncnn_vulkan import sr_ncnn_vulkan as sr
+ stat = sr.init()
+ sr.setDebug(True)
if stat < 0:
pass
# QtOwner().ShowMsg(self.tr("未发现支持VULKAN的GPU, Waiuf2x当前为CPU模式, " + ", code:{}".format(str(stat))))
@@ -180,24 +182,26 @@ class MainView(Main, QtTaskBase):
# self.qtReadImg.frame.qtTool.checkBox.setEnabled(False)
IsCanUse = True
- gpuInfo = waifu2x_vulkan.getGpuInfo()
- cpuNum = waifu2x_vulkan.getCpuCoreNum()
- gpuNum = waifu2x_vulkan.getGpuCoreNum()
+ gpuInfo = sr.getGpuInfo()
+ cpuNum = sr.getCpuCoreNum()
+ gpuNum = sr.getGpuCoreNum()
self.settingView.SetGpuInfos(gpuInfo, cpuNum)
# if not gpuInfo or (gpuInfo and config.Encode < 0) or (gpuInfo and config.Encode >= len(gpuInfo)):
# config.Encode = 0
- sts = waifu2x_vulkan.initSet(config.Encode, config.UseCpuNum)
+ sts = sr.initSet(config.Encode, config.UseCpuNum)
TaskWaifu2x().Start()
- version = waifu2x_vulkan.getVersion()
+ version = sr.getVersion()
config.Waifu2xVersion = version
self.helpView.waifu2x.setText(config.Waifu2xVersion)
+ import sys, os
Log.Warn("Waifu2x init:{}, encode:{}, version:{}, code:{}, cpuNum:{}/{}, gpuNum:{}, gpuList:{}".format(
stat, config.Encode, version, sts, config.UseCpuNum, cpuNum, gpuNum, gpuInfo
))
else:
- QtOwner().ShowError("Waifu2x Error, " + config.ErrorMsg)
+ if not config.CloseWaifu2x:
+ QtOwner().ShowError("Waifu2x Error, " + config.ErrorMsg)
Log.Warn("Waifu2x Error: " + str(config.ErrorMsg))
if not IsCanUse:
@@ -211,7 +215,7 @@ class MainView(Main, QtTaskBase):
self.waifu2xToolView.checkBox.setEnabled(False)
self.waifu2xToolView.changeButton.setEnabled(False)
self.waifu2xToolView.changeButton.setEnabled(False)
- self.waifu2xToolView.comboBox.setEnabled(False)
+ self.waifu2xToolView.modelName.setEnabled(False)
self.waifu2xToolView.SetStatus(False)
Setting.IsOpenWaifu.SetValue(0)
diff --git a/src/view/read/read_tool.py b/src/view/read/read_tool.py
index a28acf5..c67b6e9 100644
--- a/src/view/read/read_tool.py
+++ b/src/view/read/read_tool.py
@@ -116,7 +116,18 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
self.gpuLabel.setMaximumWidth(250)
self.curWaifu2x.clicked.connect(self.OpenCurWaifu)
self.preDownWaifu2x.clicked.connect(self.OpenPreDownloadWaifu2x)
+ self.modelNameButton.setText(ToolUtil.GetShowModelName(Setting.LookModelName.value))
+ self.modelNameButton.setToolTip(Setting.LookModelName.value)
+ self.modelNameButton.clicked.connect(self.OpenSrSelect)
+ self.modelNameButton.setEnabled(False)
+
+ def OpenSrSelect(self):
+ QtOwner().OpenSrSelectModel(self.modelNameButton.toolTip(), self.OpenSrSelectBack)
+ def OpenSrSelectBack(self, newModName):
+ Setting.LookModelName.SetValue(newModName)
+ self.modelNameButton.setText(ToolUtil.GetShowModelName(Setting.LookModelName.value))
+ self.modelNameButton.setToolTip(Setting.LookModelName.value)
@property
def imgFrame(self):
@@ -336,10 +347,20 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
return
def UpdateText(self, model):
- model, noise, scale = ToolUtil.GetModelAndScale(model)
- self.modelLabel.setText(model)
- self.noiseLabel.setText(str(noise))
- self.scaleLabel.setText(str(scale))
+ if not model:
+ self.scaleLabel.setText(str(Setting.LookScale.value))
+ self.modelNameButton.setText(ToolUtil.GetShowModelName(Setting.LookModelName.value))
+ self.modelNameButton.setToolTip(Setting.LookModelName.value)
+ else:
+ scale = model.get('scale', 0)
+ modelName = model.get('model_name', 0)
+ self.scaleLabel.setText(str(scale))
+ self.modelNameButton.setText(ToolUtil.GetShowModelName(modelName))
+ self.modelNameButton.setToolTip(modelName)
+ # model, noise, scale = ToolUtil.GetModelAndScale(model)
+ # self.modelLabel.setText(model)
+ # self.noiseLabel.setText(str(noise))
+ # self.scaleLabel.setText(str(scale))
self.gpuLabel.setText(QtOwner().settingView.GetGpuName())
def OpenLastEps(self):
@@ -442,9 +463,11 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
self.SetWaifu2xCancle(True)
def Waifu2xCancle(self):
- Setting.LookNoise.SetValue(self.noiseBox.currentIndex() -1)
+ if self.modelNameButton.toolTip():
+ Setting.LookModelName.SetValue(self.modelNameButton.toolTip())
+ # Setting.LookNoise.SetValue(self.noiseBox.currentIndex() -1)
Setting.LookScale.SetValue(self.scaleBox.value())
- Setting.LookModel.SetValue(self.modelBox.currentIndex())
+ # Setting.LookModel.SetValue(self.modelBox.currentIndex())
for data in self.readImg.pictureData.values():
@@ -478,14 +501,15 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
def SetWaifu2xCancle(self, isVisibel=False):
self.waifu2xSave.setVisible(not isVisibel)
- self.noiseLabel.setVisible(not isVisibel)
+ # self.noiseLabel.setVisible(not isVisibel)
self.scaleLabel.setVisible(not isVisibel)
- self.modelLabel.setVisible(not isVisibel)
-
+ # self.modelLabel.setVisible(not isVisibel)
+ # self.modelNameButton.setVisible(isVisibel)
+ self.modelNameButton.setEnabled(isVisibel)
self.waifu2xCancle.setVisible(isVisibel)
- self.noiseBox.setVisible(isVisibel)
+ # self.noiseBox.setVisible(isVisibel)
self.scaleBox.setVisible(isVisibel)
- self.modelBox.setVisible(isVisibel)
+ # self.modelBox.setVisible(isVisibel)
def ScalePicture2(self, value):
self.zoomSlider.setValue(value)
diff --git a/src/view/read/read_view.py b/src/view/read/read_view.py
index fefbc72..50182db 100644
--- a/src/view/read/read_view.py
+++ b/src/view/read/read_view.py
@@ -82,6 +82,8 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
def retranslateUi(self, View):
self.qtTool.retranslateUi(self.qtTool)
+ self.qtTool.modelNameButton.setText(ToolUtil.GetShowModelName(Setting.LookModelName.value))
+ self.qtTool.modelNameButton.setToolTip(Setting.LookModelName.value)
def SelectMenu(self):
popMenu = QMenu(self)
@@ -570,13 +572,13 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
else:
self.qtTool.SetData(state=QtFileData.Converting)
- self.qtTool.modelBox.setEnabled(False)
+ # self.qtTool.modelBox.setEnabled(False)
# self.frame.process.show()
return
- if isCurIndex:
- # self.frame.process.hide()
- if config.CanWaifu2x:
- self.qtTool.modelBox.setEnabled(True)
+ # if isCurIndex:
+ # # self.frame.process.hide()
+ # if config.CanWaifu2x:
+ # self.qtTool.modelBox.setEnabled(True)
assert isinstance(p, QtFileData)
waifu2x = False
diff --git a/src/view/setting/setting_sr_select_view.py b/src/view/setting/setting_sr_select_view.py
new file mode 100644
index 0000000..74c84f1
--- /dev/null
+++ b/src/view/setting/setting_sr_select_view.py
@@ -0,0 +1,100 @@
+import base64
+
+from PySide6.QtCore import Signal, Qt, QTimer
+from PySide6.QtWidgets import QHeaderView, QTableWidgetItem
+
+from component.dialog.base_mask_dialog import BaseMaskDialog
+from component.label.gif_label import GifLabel
+from config.setting import Setting
+from interface.ui_sr_select_widget import Ui_SrSelect
+from qt_owner import QtOwner
+from task.qt_task import QtTaskBase
+from tools.str import Str
+
+
+class SettingSrSelectView(BaseMaskDialog, Ui_SrSelect):
+ Close = Signal(str)
+
+ def __init__(self, parent=None, curModelName=""):
+ BaseMaskDialog.__init__(self, parent)
+ Ui_SrSelect.__init__(self)
+ self.widget.adjustSize()
+ self.setupUi(self.widget)
+ self.curModelName = curModelName
+ self.saveButton.clicked.connect(self._ClickButton)
+ self.closeButton.clicked.connect(self.close)
+ self.tableWidget.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+ # self.tableWidget.horizontalHeader().setMinimumSectionSize(120)
+ self.tableWidget.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
+ self.tableWidget.setColumnWidth(0, 200)
+ self.tableWidget.setColumnWidth(1, 150)
+ self.tableWidget.setColumnWidth(2, 100)
+ self.tableWidget.setColumnWidth(3, 100)
+ self.Init()
+
+ def _ClickButton(self):
+ selected = self.tableWidget.selectedIndexes()
+ selectRows = []
+ for index in selected:
+ selectRows.append(index.row())
+ if not selectRows:
+ return
+ row = selectRows[0]
+ modelName1 = self.tableWidget.item(row, 0).text()
+ modelName2 = self.tableWidget.item(row, 1).text().replace("-", "")
+ modelName = "MODEL_" + modelName2.upper() + "_" + modelName1.upper()
+ self.Close.emit(modelName)
+ self.close()
+
+ def Init(self):
+ AllModelNames = [
+ ("CUNET_UP1X_DENOISE0X","Waifu2x", "", "100%"),
+ ("CUNET_UP1X_DENOISE1X","Waifu2x", "", "110%"),
+ ("CUNET_UP1X_DENOISE2X","Waifu2x", "", "110%"),
+ ("CUNET_UP1X_DENOISE3X","Waifu2x", "", "110%"),
+ ("CUNET_UP2X","Waifu2x", "", "300%"),
+ ("CUNET_UP2X_DENOISE0X","Waifu2x", "", "310%"),
+ ("CUNET_UP2X_DENOISE1X","Waifu2x", "", "310%"),
+ ("CUNET_UP2X_DENOISE2X","Waifu2x", "", "310%"),
+ ("CUNET_UP2X_DENOISE3X","Waifu2x", "推荐使用", "310%"),
+ ("ANIME_UP2X","Waifu2x", "", "200%"),
+ ("ANIME_UP2X_DENOISE0X","Waifu2x", "", "210%"),
+ ("ANIME_UP2X_DENOISE1X","Waifu2x", "", "210%"),
+ ("ANIME_UP2X_DENOISE2X","Waifu2x", "", "210%"),
+ ("ANIME_UP2X_DENOISE3X","Waifu2x", "推荐使用", "210%"),
+ ("PHOTO_UP2X","Waifu2x", "", "180%"),
+ ("PHOTO_UP2X_DENOISE0X","Waifu2x", "", "200%"),
+ ("PHOTO_UP2X_DENOISE1X","Waifu2x", "", "200%"),
+ ("PHOTO_UP2X_DENOISE2X","Waifu2x", "", "200%"),
+ ("PHOTO_UP2X_DENOISE3X","Waifu2x", "推荐使用", "200%"),
+ ("PRO_UP2X","Real-CUGAN", "", "350%"),
+ ("PRO_UP2X_CONSERVATIVE","Real-CUGAN", "", "350%"),
+ ("PRO_UP2X_DENOISE3X","Real-CUGAN", "推荐使用", "350%"),
+ ("PRO_UP3X","Real-CUGAN", "", "500%"),
+ ("PRO_UP3X_CONSERVATIVE","Real-CUGAN", "", "500%"),
+ ("PRO_UP3X_DENOISE3X","Real-CUGAN", "", "500%"),
+ ("SE_UP2X","Real-CUGAN", "", "300%"),
+ ("SE_UP2X_CONSERVATIVE","Real-CUGAN", "", "300%"),
+ ("SE_UP2X_DENOISE1X","Real-CUGAN", "", "300%"),
+ ("SE_UP2X_DENOISE2X","Real-CUGAN", "", "300%"),
+ ("SE_UP2X_DENOISE3X","Real-CUGAN", "推荐使用", "300%"),
+ ("SE_UP3X","Real-CUGAN", "", "500%"),
+ ("SE_UP3X_CONSERVATIVE","Real-CUGAN", "", "500%"),
+ ("SE_UP3X_DENOISE3X","Real-CUGAN", "", "500%"),
+ ("SE_UP4X","Real-CUGAN", "", "400%"),
+ ("SE_UP4X_CONSERVATIVE","Real-CUGAN", "", "400%"),
+ ("SE_UP4X_DENOISE3X","Real-CUGAN", "", "400%"),
+ ("ANIMAVIDEOV3_UP2X","Real-ESRGAN", "推荐使用", "200%"),
+ ("ANIMAVIDEOV3_UP3X","Real-ESRGAN", "", "300%"),
+ ("ANIMAVIDEOV3_UP4X","Real-ESRGAN", "", "400%"),
+ ("X4PLUS_UP4X","Real-ESRGAN", "", "600%"),
+ ("X4PLUSANIME_UP4X", "Real-ESRGAN", "", "400%"),
+ ]
+ for v in AllModelNames:
+ rowCont = self.tableWidget.rowCount()
+ self.tableWidget.insertRow(rowCont)
+ self.tableWidget.setItem(rowCont, 0, QTableWidgetItem(v[0]))
+ self.tableWidget.setItem(rowCont, 1, QTableWidgetItem(v[1]))
+ self.tableWidget.setItem(rowCont, 2, QTableWidgetItem(v[3]))
+ self.tableWidget.setItem(rowCont, 3, QTableWidgetItem(v[2]))
+ pass
\ No newline at end of file
diff --git a/src/view/setting/setting_view.py b/src/view/setting/setting_view.py
index 037dcbb..3739ef8 100644
--- a/src/view/setting/setting_view.py
+++ b/src/view/setting/setting_view.py
@@ -51,7 +51,7 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
self.preDownWaifu2x.clicked.connect(partial(self.CheckButtonEvent, Setting.PreDownWaifu2x, self.preDownWaifu2x))
self.coverCheckBox.clicked.connect(partial(self.CheckButtonEvent, Setting.CoverIsOpenWaifu, self.coverCheckBox))
self.downAuto.clicked.connect(partial(self.CheckButtonEvent, Setting.DownloadAuto, self.downAuto))
- self.titleBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsUseTitleBar, self.titleBox))
+ # self.titleBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsUseTitleBar, self.titleBox))
self.openglBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsOpenOpenGL, self.openglBox))
self.grabGestureBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsGrabGesture, self.grabGestureBox))
# self.isShowClose.clicked.connect(partial(self.CheckButtonEvent, Setting.IsNotShowCloseTip, self.isShowClose))
@@ -64,12 +64,16 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
# comboBox:
# self.encodeSelect.currentIndexChanged.connect(partial(self.CheckRadioEvent, "LookReadMode"))
- self.readModel.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.LookModel))
- self.readNoise.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.LookNoise))
- self.coverModel.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.CoverLookModel))
- self.coverNoise.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.CoverLookNoise))
- self.downModel.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.DownloadModel))
- self.downNoise.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.DownloadNoise))
+ # self.readModel.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.LookModel))
+ # self.readNoise.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.LookNoise))
+ # self.coverModel.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.CoverLookModel))
+ # self.coverNoise.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.CoverLookNoise))
+ # self.downModel.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.DownloadModel))
+ # self.downNoise.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.DownloadNoise))
+
+ self.readModelName.clicked.connect(partial(self.CheckOpenSrSelect, Setting.LookModelName, self.readModelName))
+ self.coverModelName.clicked.connect(partial(self.CheckOpenSrSelect, Setting.CoverLookModelName, self.coverModelName))
+ self.downModelName.clicked.connect(partial(self.CheckOpenSrSelect, Setting.DownloadModelName, self.downModelName))
self.encodeSelect.currentTextChanged.connect(partial(self.CheckRadioEvent, Setting.SelectEncodeGpu))
self.threadSelect.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.Waifu2xCpuCore))
self.titleLineBox.currentIndexChanged.connect(partial(self.CheckRadioEvent, Setting.TitleLine))
@@ -172,7 +176,31 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
QtOwner().ShowMsgOne(Str.GetStr(Str.SaveSuc))
self.CheckMsgLabel()
return
+
+ def CheckOpenSrSelect(self, setItem, button):
+ if button == self.coverModelName:
+ QtOwner().OpenSrSelectModel(setItem.value, self.CheckOpenSrSelectCoverBack)
+ elif button == self.readModelName:
+ QtOwner().OpenSrSelectModel(setItem.value, self.CheckOpenSrSelectReadBack)
+ elif button == self.downModelName:
+ QtOwner().OpenSrSelectModel(setItem.value, self.CheckOpenSrSelectDownBack)
+ pass
+ def CheckOpenSrSelectCoverBack(self, modelName):
+ Setting.CoverLookModelName.SetValue(modelName)
+ self.coverModelName.setText(modelName)
+ return modelName
+
+ def CheckOpenSrSelectReadBack(self, modelName):
+ Setting.LookModelName.SetValue(modelName)
+ self.readModelName.setText(modelName)
+ return modelName
+
+ def CheckOpenSrSelectDownBack(self, modelName):
+ Setting.DownloadModelName.SetValue(modelName)
+ self.downModelName.setText(modelName)
+ return modelName
+
def CheckRadioEvent(self, setItem, value):
assert isinstance(setItem, SettingValue)
setItem.SetValue(value)
@@ -225,7 +253,7 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
self.httpEdit.setText(Setting.HttpProxy.value)
self.sockEdit.setText(Setting.Sock5Proxy.value)
self.chatProxy.setChecked(Setting.ChatProxy.value)
- self.titleBox.setChecked(Setting.IsUseTitleBar.value)
+ # self.titleBox.setChecked(Setting.IsUseTitleBar.value)
self.openglBox.setChecked(Setting.IsOpenOpenGL.value)
self.grabGestureBox.setChecked(Setting.IsGrabGesture.value)
# self.isShowClose.setChecked(Setting.IsNotShowCloseTip.value)
@@ -245,27 +273,33 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
self.readCheckBox.setChecked(Setting.IsOpenWaifu.value)
self.preDownWaifu2x.setChecked(Setting.PreDownWaifu2x.value)
- self.readNoise.setCurrentIndex(Setting.LookNoise.value)
+ # self.readNoise.setCurrentIndex(Setting.LookNoise.value)
self.readScale.setValue(Setting.LookScale.value)
- self.readModel.setCurrentIndex(Setting.LookModel.value)
+ # self.readModel.setCurrentIndex(Setting.LookModel.value)
self.categoryBox.setCurrentIndex(Setting.NotCategoryShow.value)
self.titleLineBox.setCurrentIndex(Setting.TitleLine.value)
self.tileComboBox.setCurrentIndex(Setting.Waifu2xTileSize.value)
self.coverCheckBox.setChecked(Setting.CoverIsOpenWaifu.value)
- self.coverNoise.setCurrentIndex(Setting.CoverLookNoise.value)
+ # self.coverNoise.setCurrentIndex(Setting.CoverLookNoise.value)
self.coverScale.setValue(Setting.CoverLookScale.value)
- self.coverModel.setCurrentIndex(Setting.CoverLookModel.value)
+ # self.coverModel.setCurrentIndex(Setting.CoverLookModel.value)
self.downAuto.setChecked(Setting.DownloadAuto.value)
- self.downNoise.setCurrentIndex(Setting.DownloadNoise.value)
+ # self.downNoise.setCurrentIndex(Setting.DownloadNoise.value)
self.downScale.setValue(Setting.DownloadScale.value)
- self.downModel.setCurrentIndex(Setting.DownloadModel.value)
+ # self.downModel.setCurrentIndex(Setting.DownloadModel.value)
+ self.coverModelName.setText(Setting.CoverLookModelName.value)
+ self.readModelName.setText(Setting.LookModelName.value)
+ self.downModelName.setText(Setting.DownloadModelName.value)
self.SetDownloadLabel()
def retranslateUi(self, SettingNew):
Ui_SettingNew.retranslateUi(self, SettingNew)
self.SetDownloadLabel()
+ self.coverModelName.setText(Setting.CoverLookModelName.value)
+ self.readModelName.setText(Setting.LookModelName.value)
+ self.downModelName.setText(Setting.DownloadModelName.value)
def SetRadioGroup(self, text, index):
radio = getattr(self, text+str(index))
diff --git a/src/view/tool/local_eps_read_view.py b/src/view/tool/local_eps_read_view.py
index 471905c..71b5859 100644
--- a/src/view/tool/local_eps_read_view.py
+++ b/src/view/tool/local_eps_read_view.py
@@ -1,15 +1,21 @@
+import json
import os
+from this import d
from PySide6.QtCore import Signal, QUrl
-from PySide6.QtGui import QDesktopServices
-from PySide6.QtWidgets import QWidget
+from PySide6.QtGui import QAction, Qt, QDesktopServices
+from PySide6.QtWidgets import QWidget, QMenu, QFileDialog
from natsort import natsorted
from interface.ui_index import Ui_Index
+from interface.ui_local import Ui_Local
from interface.ui_local_eps import Ui_LocalEps
from qt_owner import QtOwner
+from server import req, Log, User, Status
from task.qt_task import QtTaskBase
from task.task_local import LocalData
+from tools.str import Str
+from view.tool.local_read_db import LocalReadDb
class LocalEpsReadView(QWidget, Ui_LocalEps, QtTaskBase):
diff --git a/src/view/tool/local_read_eps_view.py b/src/view/tool/local_read_eps_view.py
index 01e6896..5c8786b 100644
--- a/src/view/tool/local_read_eps_view.py
+++ b/src/view/tool/local_read_eps_view.py
@@ -1,11 +1,20 @@
-from PySide6.QtCore import Signal
-from PySide6.QtWidgets import QWidget
+import json
+import os
+from this import d
+
+from PySide6.QtCore import Signal, QUrl
+from PySide6.QtGui import QAction, Qt, QDesktopServices
+from PySide6.QtWidgets import QWidget, QMenu, QFileDialog
+from natsort import natsorted
from interface.ui_index import Ui_Index
+from interface.ui_local import Ui_Local
from interface.ui_local_eps import Ui_LocalEps
from qt_owner import QtOwner
from task.qt_task import QtTaskBase
from task.task_local import LocalData
+from tools.str import Str
+from view.tool.local_read_db import LocalReadDb
class LocalReadEpsView(QWidget, Ui_LocalEps, QtTaskBase):
diff --git a/src/view/tool/local_read_view.py b/src/view/tool/local_read_view.py
index 79545a4..50ddee6 100644
--- a/src/view/tool/local_read_view.py
+++ b/src/view/tool/local_read_view.py
@@ -1,7 +1,9 @@
+import json
import os
+from this import d
from PySide6.QtCore import Signal, QUrl
-from PySide6.QtGui import QAction, QDesktopServices
+from PySide6.QtGui import QAction, Qt, QDesktopServices
from PySide6.QtWidgets import QWidget, QMenu, QFileDialog
from natsort import natsorted
@@ -471,4 +473,4 @@ class LocalReadView(QWidget, Ui_Local, QtTaskBase):
self.db.DelBookCategory(bookId)
for v in categoryList:
self.db.AddCategory(v, bookId)
- self.Init()
+ self.Init()
\ No newline at end of file
diff --git a/src/view/tool/waifu2x_tool_view.py b/src/view/tool/waifu2x_tool_view.py
index 3992eaa..4a9ea3b 100644
--- a/src/view/tool/waifu2x_tool_view.py
+++ b/src/view/tool/waifu2x_tool_view.py
@@ -8,6 +8,7 @@ from PySide6.QtGui import QPainter, QPixmap, QDoubleValidator, \
from PySide6.QtWidgets import QFrame, QGraphicsPixmapItem, QGraphicsScene, QApplication, QFileDialog, QLabel, QGraphicsView
from config import config
+from config.setting import Setting
from interface.ui_waifu2x_tool import Ui_Waifu2xTool
from qt_owner import QtOwner
from task.qt_task import QtTaskBase
@@ -28,13 +29,16 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
self.curIndex = 0
# self.resize(800, 900)
self.checkBox.setChecked(True)
- self.index = 0
- self.comboBox.setCurrentIndex(self.index)
+ from config.setting import Setting
+ self.modelName.setText(ToolUtil.GetShowModelName(Setting.LookModelName.value))
+ self.modelName.setToolTip(Setting.LookModelName.value)
+
+ # self.comboBox.setCurrentIndex(self.index)
validator = QIntValidator(0, 9999999)
self.heighEdit.setValidator(validator)
self.widthEdit.setValidator(validator)
exp = QDoubleValidator(0.1, 64, 1)
- # exp.setNotation(exp.StandardNotation)
+ exp.setNotation(QDoubleValidator.StandardNotation)
self.scaleEdit.setValidator(exp)
# self.setWindowFlags(Qt.FramelessWindowHint)
@@ -58,7 +62,6 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
self.graphicsScene = QGraphicsScene(self) # 场景
self.graphicsView.setScene(self.graphicsScene)
- self.graphicsView.setDragMode(QGraphicsView.ScrollHandDrag)
self.graphicsItem.setWidget(QLabel())
# self.graphicsItem.setPixmap(QPixmap())
# self.graphicsItem.setTransformationMode(Qt.SmoothTransformation)
@@ -84,6 +87,28 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
self.data = ""
self.waifu2xData = ""
self.backStatus = ""
+ self.modelName.clicked.connect(self.OpenSrSelect)
+ self.fmtComboBox.currentIndexChanged.connect(self.CheckStatus)
+
+ def retranslateUi(self, SettingNew):
+ oldName = self.modelName.toolTip()
+ Ui_Waifu2xTool.retranslateUi(self, SettingNew)
+ self.modelName.setText(ToolUtil.GetShowModelName(oldName))
+ self.modelName.setToolTip(oldName)
+
+ def OpenSrSelect(self):
+ QtOwner().OpenSrSelectModel(self.modelName.text(), self.OpenSrSelectBack)
+
+ def OpenSrSelectBack(self, newModName):
+ self.modelName.setText(ToolUtil.GetShowModelName(newModName))
+ self.modelName.setToolTip(newModName)
+ self.CheckStatus()
+
+ def CheckStatus(self):
+ data = self.GetStatus()
+ if self.backStatus != data:
+ self.changeButton.setText(Str.GetStr(Str.Convert))
+ self.changeButton.setEnabled(True)
def SwitchCurrent(self, **kwargs):
data = kwargs.get("data")
@@ -93,7 +118,7 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
self.waifu2xData = None
self.ClearConvert()
if config.CanWaifu2x:
- self.comboBox.setEnabled(True)
+ self.modelName.setEnabled(True)
self.changeButton.setEnabled(True)
self.changeButton.setText(Str.GetStr(Str.Convert))
self.backStatus = ""
@@ -280,34 +305,27 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
return
if not config.CanWaifu2x:
return
- from waifu2x_vulkan import waifu2x_vulkan
- self.comboBox.setEnabled(False)
+ from sr_ncnn_vulkan import sr_ncnn_vulkan as sr
+ self.modelName.setEnabled(False)
+ # self.comboBox.setEnabled(False)
self.changeButton.setEnabled(False)
self.SetStatus(False)
- self.index = self.comboBox.currentIndex()
- index = self.comboBox.currentIndex()
- noise = int(self.noiseCombox.currentText())
- if index == 0:
- modelName = "CUNET"
- elif index == 1:
- modelName = "PHOTO"
- elif index == 2:
- modelName = "ANIME_STYLE_ART_RGB"
+ if self.fmtComboBox.currentIndex() == 0:
+ fmt = ""
else:
- return
- if noise == -1:
- noiseName = "NO_NOISE"
- else:
- noiseName = "NOISE"+str(noise)
- if modelName == "CUNET" and self.scaleRadio.isChecked() and round(float(self.scaleEdit.text()), 1) <= 1:
- modelInsence = "MODEL_{}_NO_SCALE_{}".format(modelName, noiseName)
- else:
- modelInsence = "MODEL_{}_{}".format(modelName, noiseName)
+ fmt = str(self.fmtComboBox.currentText()).lower()
+ # self.index = self.modelName.text()
+ # self.index = self.comboBox.currentIndex()
+ # index = self.comboBox.currentIndex()
+ # noise = int(self.noiseCombox.currentText())
+
+ modelInsence = self.modelName.toolTip()
if self.ttaModel.isChecked():
modelInsence += "_TTA"
model = {
- "model": getattr(waifu2x_vulkan, modelInsence),
+ "model": getattr(sr, modelInsence),
+ "format": fmt
}
if self.scaleRadio.isChecked():
model['scale'] = round(float(self.scaleEdit.text()), 1)
@@ -332,7 +350,8 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
else:
self.changeButton.setEnabled(True)
self.SetStatus(True)
- self.comboBox.setEnabled(True)
+ self.modelName.setEnabled(True)
+ # self.comboBox.setEnabled(True)
return
def SavePicture(self):
@@ -360,22 +379,22 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
self.ShowImg(self.data)
return
- def ChangeModel(self, index):
- if self.comboBox.currentIndex() == self.index:
- return
- # self.index = self.comboBox.currentIndex()
- self.changeButton.setText(Str.GetStr(Str.Convert))
- self.changeButton.setEnabled(True)
- return
+ # def ChangeModel(self, index):
+ # if self.comboBox.currentIndex() == self.index:
+ # return
+ # # self.index = self.comboBox.currentIndex()
+ # self.changeButton.setText(Str.GetStr(Str.Convert))
+ # self.changeButton.setEnabled(True)
+ # return
def GetStatus(self):
- data = str(self.noiseCombox.currentText()) + \
+ data = \
str(self.buttonGroup_2.checkedId()) + \
str(self.scaleEdit.text()) + \
str(self.heighEdit.text()) + \
str(int(self.ttaModel.isChecked())) + \
str(self.widthEdit.text()) + \
- str(self.comboBox.currentIndex())
+ str(self.modelName.toolTip()) + str(self.fmtComboBox.currentText())
return data
def SetStatus(self, status):
@@ -384,7 +403,7 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
self.scaleEdit.setEnabled(status)
self.widthEdit.setEnabled(status)
self.heighEdit.setEnabled(status)
- self.noiseCombox.setEnabled(status)
+ # self.noiseCombox.setEnabled(status)
# self.radioButton_4.setEnabled(status)
# self.radioButton_5.setEnabled(status)
# self.radioButton_6.setEnabled(status)
@@ -422,32 +441,4 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
return
QtOwner().owner.navigationWidget.UpdatePictureData(data)
QtOwner().ShowMsg(Str.GetStr(Str.HeadUpload))
- # QtImgMgr().SetHeadStatus(not self.isHeadUp)
-
- # def dragEnterEvent(self, event):
- # if(event.mimeData().hasUrls()):
- # event.acceptProposedAction()
- # else:
- # event.ignore()
- #
- # def dragMoveEvent(self, evemt):
- # return
- #
- # def dropEvent(self, event):
- # mimeData = event.mimeData()
- # if(mimeData.hasUrls()):
- # urls = mimeData.urls()
- # QtOwner().ShowLoading()
- # fileNames = [str(i.toLocalFile()) for i in urls]
- # if not fileNames:
- # return
- # name = fileNames[0]
- # if os.path.isfile(name):
- # f = open(name, "rb")
- # data = f.read()
- # f.close()
- # self.data = data
- # self.waifu2xData = None
- # self.ClearConvert()
- # self.backStatus = ""
- # self.ShowImg(data)
\ No newline at end of file
+ # QtImgMgr().SetHeadStatus(not self.isHeadUp)
\ No newline at end of file
diff --git a/src/view/user/login_proxy_widget.py b/src/view/user/login_proxy_widget.py
index 3435a3d..fe3e7c2 100644
--- a/src/view/user/login_proxy_widget.py
+++ b/src/view/user/login_proxy_widget.py
@@ -409,7 +409,7 @@ class LoginProxyWidget(QtWidgets.QWidget, Ui_LoginProxyWidget, QtTaskBase):
QtOwner().settingView.SetSock5Proxy()
Server().UpdateDns(address, imageServer, imageAdress)
- Log.Info("update proxy, apiSetId:{}, imgSetID:{}, image server:{}:{}, address:{}".format(Setting.ProxySelectIndex.value, Setting.ProxyImgSelectIndex.value, Server().imageServer, Server().imageAddress, Server().address))
+ Log.Warn("update proxy, ver:{}, apiSetId:{}, imgSetID:{}, image server:{}:{}, address:{}".format(config.UpdateVersion, Setting.ProxySelectIndex.value, Setting.ProxyImgSelectIndex.value, Server().imageServer, Server().imageAddress, Server().address))
def SaveSetting(self):
Setting.PreferCDNIP.SetValue(self.cdn_api_ip.text())
diff --git a/ui/component/ui_navigation.ui b/ui/component/ui_navigation.ui
index 414de6f..4ecc988 100644
--- a/ui/component/ui_navigation.ui
+++ b/ui/component/ui_navigation.ui
@@ -234,7 +234,7 @@
0
- 0
+ -521
339
800
@@ -988,7 +988,7 @@
Qt::NoFocus
- Waifu2x
+ 图片超分
diff --git a/ui/component/ui_read_tool.ui b/ui/component/ui_read_tool.ui
index e4159df..f0d3e33 100644
--- a/ui/component/ui_read_tool.ui
+++ b/ui/component/ui_read_tool.ui
@@ -42,8 +42,8 @@
0
0
- 309
- 827
+ 301
+ 841
@@ -190,100 +190,38 @@
-
-
-
-
-
-
-
-
- CUNET
-
-
-
- -
-
-
-
-
- 自动
-
-
- -
-
- cunet
-
-
- -
-
- photo
-
-
- -
-
- anime_style_art_rgb
-
-
-
-
-
+ -
+
+
+ 大小:
+
+
-
-
-
-
- 35
- 16777215
-
-
-
- 模型:
-
-
-
- -
-
-
- 放大倍数:
-
-
-
- -
转换模式:
- -
-
-
- 耗时:
-
-
-
- -
-
+
-
+
-
-
-
- GPU
-
-
-
- -
- -
-
+
-
+
-
+ 本张图开启Waifu2x (F2)
@@ -294,28 +232,23 @@
- -
-
-
-
-
-
- 保存
-
-
-
-
-
- -
-
+
-
+
- -
-
+
-
+
+
+
+ 35
+ 16777215
+
+
- 去噪等级:
+ 模型:
@@ -332,28 +265,55 @@
- -
-
+
-
+
+
-
+
+
+ 保存
+
+
+
+
+
+ -
+
+
+
+ 150
+ 16777215
+
+
- 本张图开启Waifu2x (F2)
+ GPU
+
+
+ true
- -
-
+
-
+
- 状态:
+ 放大倍数:
- -
+
-
分辨率:
- -
+
-
+
+
+ 状态:
+
+
+
+ -
-
@@ -380,52 +340,19 @@
- -
-
+
-
+
- 大小:
+
- -
-
-
-
-
-
- 3
-
-
-
- -
-
-
-
-
- 自动
-
-
- -
-
- 0
-
-
- -
-
- 1
-
-
- -
-
- 2
-
-
- -
-
- 3
-
-
-
-
-
+ -
+
+
+ 耗时:
+
+
-
@@ -434,6 +361,17 @@
+ -
+
+
-
+
+
+
+
+
+
+
+
-
@@ -818,8 +756,8 @@
OpenNextEps()
- 285
- 667
+ 294
+ 738
278
@@ -834,8 +772,8 @@
LastPage()
- 113
- 707
+ 119
+ 779
181
@@ -850,8 +788,8 @@
NextPage()
- 285
- 707
+ 294
+ 779
181
@@ -866,8 +804,8 @@
OpenLastEps()
- 83
- 667
+ 89
+ 738
278
@@ -882,8 +820,8 @@
hide()
- 165
- 537
+ 170
+ 630
105
@@ -898,8 +836,8 @@
ReturnPage()
- 202
- 595
+ 207
+ 690
181
@@ -930,8 +868,8 @@
FullScreen()
- 113
- 566
+ 118
+ 660
278
@@ -946,8 +884,8 @@
Waifu2xSave()
- 193
- 186
+ 117
+ 248
296
@@ -962,8 +900,8 @@
Waifu2xCancle()
- 284
- 186
+ 285
+ 248
298
@@ -978,8 +916,8 @@
ScalePicture()
- 208
- 469
+ 294
+ 500
298
@@ -994,8 +932,8 @@
ChangeReadMode()
- 285
- 427
+ 294
+ 479
402
diff --git a/ui/component/ui_sr_select_widget.ui b/ui/component/ui_sr_select_widget.ui
new file mode 100644
index 0000000..6d262f9
--- /dev/null
+++ b/ui/component/ui_sr_select_widget.ui
@@ -0,0 +1,148 @@
+
+
+ SrSelect
+
+
+
+ 0
+ 0
+ 673
+ 345
+
+
+
+
+ 500
+ 0
+
+
+
+ Form
+
+
+
-
+
+
+ 支持Waifu2x、Real-CUGAN、Real-ESRGAN(不支持CPU)
+
+
+
+ -
+
+
+ UP2X:采样倍率(建议选2X),DENOISE:降噪等级(建议选最高),
+
+
+
+ -
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ 25
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+ true
+
+
+ 23
+
+
+ 23
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ 模型名
+
+
+
+
+ 算法
+
+
+
+
+ 耗时
+
+
+
+
+ 描述
+
+
+
+
+ -
+
+
-
+
+
+
+ 150
+ 30
+
+
+
+
+
+
+ 确定
+
+
+ Return
+
+
+
+ -
+
+
+
+ 150
+ 30
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/ui_download.ui b/ui/ui_download.ui
index 21e7bc8..d03d392 100644
--- a/ui/ui_download.ui
+++ b/ui/ui_download.ui
@@ -14,7 +14,70 @@
下载
- -
+
-
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ 下载失败后自动重试
+
+
+
+ -
+
+
+ true
+
+
+ 下载自动Waifu2x转换
+
+
+ true
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+ 全部
+
+
+ -
+
+ 未完成
+
+
+ -
+
+ 已完成
+
+
+
+
+ -
+
+
+
+
+ -
-
@@ -75,64 +138,12 @@
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- 更新New章节
-
-
-
- -
-
-
- 开始下载
-
-
-
- -
-
-
- 暂停下载
-
-
-
- -
-
-
- 开始转换
-
-
-
- -
-
-
- 暂停转换
-
-
-
-
-
- -
-
+
-
+
-
-
+
Qt::Horizontal
@@ -145,22 +156,37 @@
-
-
+
- 下载失败后自动重试
+ 更新New章节
-
-
-
- true
-
+
- 下载自动Waifu2x转换
+ 开始下载
-
- true
+
+
+ -
+
+
+ 暂停下载
+
+
+
+ -
+
+
+ 开始转换
+
+
+
+ -
+
+
+ 暂停转换
diff --git a/ui/ui_help.ui b/ui/ui_help.ui
index bdec2dc..6daf89f 100644
--- a/ui/ui_help.ui
+++ b/ui/ui_help.ui
@@ -29,7 +29,7 @@ QScrollArea {background-color:transparent;}
0
0
736
- 744
+ 771
@@ -108,7 +108,7 @@ QScrollArea {background-color:transparent;}
-
-
-
+
-
@@ -126,13 +126,68 @@ QScrollArea {background-color:transparent;}
- -
+
-
+
+
+
+ 12
+
+
+
+ 上次更新时间:
+
+
+
+ -
+
+
+ 接受Beta版本更新
+
+
+
+ -
+
+
+
+ 80
+ 50
+
+
+
+
+ 12
+
+
+
+ 图片超分版本:
+
+
+
+ -
检测更新
+ -
+
+
+
+ 80
+ 50
+
+
+
+
+ 12
+
+
+
+ 本地库版本:
+
+
+
-
@@ -151,48 +206,6 @@ QScrollArea {background-color:transparent;}
- -
-
-
-
- 12
-
-
-
-
-
-
-
- -
-
-
-
- 80
- 50
-
-
-
-
- 12
-
-
-
- waifu2x版本:
-
-
-
- -
-
-
-
- 12
-
-
-
- 2021-11-27
-
-
-
-
@@ -200,64 +213,7 @@ QScrollArea {background-color:transparent;}
- -
-
-
-
- 12
-
-
-
-
-
-
-
- -
-
-
- 打开控制台
-
-
-
- -
-
-
- 接受Beta版本更新
-
-
-
- -
-
-
-
- 12
-
-
-
- v1.2.8
-
-
-
- -
-
-
-
- 12
-
-
-
- 上次更新时间:
-
-
-
- -
-
-
- 打开日志目录
-
-
-
- -
+
-
@@ -275,15 +231,53 @@ QScrollArea {background-color:transparent;}
- -
-
+
-
+
12
- 本地数据上次更新:
+
+
+
+
+ -
+
+
+ 打开日志目录
+
+
+
+ -
+
+
+
+ 12
+
+
+
+ v1.2.8
+
+
+
+ -
+
+
+
+ 12
+
+
+
+
+
+
+
+ -
+
+
+ 打开控制台
@@ -299,26 +293,56 @@ QScrollArea {background-color:transparent;}
- -
-
-
-
- 80
- 50
-
-
+
-
+
12
- 本地库版本:
+ 本地数据上次更新:
- -
-
+
-
+
+
+
+ 12
+
+
+
+ 2021-11-27
+
+
+
+ -
+
+
+
+ 12
+
+
+
+
+
+
+
+ -
+
+
+
+ 12
+
+
+
+ 配置版本
+
+
+
+ -
+
12
diff --git a/ui/ui_setting_new.ui b/ui/ui_setting_new.ui
index 3b352fd..27e67d6 100644
--- a/ui/ui_setting_new.ui
+++ b/ui/ui_setting_new.ui
@@ -95,9 +95,9 @@
0
- -899
+ -601
727
- 3096
+ 2937
@@ -636,37 +636,6 @@
- -
-
-
- QFrame::StyledPanel
-
-
- QFrame::Raised
-
-
-
-
-
-
-
- 12
-
-
-
- 标题栏设置(需重启)
-
-
-
- -
-
-
- 标题栏美化(多屏建议不勾选,win11可不勾选)
-
-
-
-
-
-
-
@@ -1568,72 +1537,6 @@
- -
-
-
-
-
-
-
- 60
- 0
-
-
-
-
- 156
- 16777215
-
-
-
- 去噪等级
-
-
-
- -
-
-
-
- 150
- 0
-
-
-
-
-
- 0
-
-
- -
-
- 1
-
-
- -
-
- 2
-
-
- -
-
- 3
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
-
-
@@ -1656,33 +1559,10 @@
-
-
-
-
- 150
- 0
-
+
+
+
-
-
-
- 自动
-
-
- -
-
- cunet
-
-
- -
-
- photo
-
-
- -
-
- anime_style_art_rgb
-
-
-
@@ -1840,72 +1720,6 @@
- -
-
-
-
-
-
-
- 60
- 0
-
-
-
-
- 156
- 16777215
-
-
-
- 去噪等级
-
-
-
- -
-
-
-
- 150
- 0
-
-
-
-
-
- 0
-
-
- -
-
- 1
-
-
- -
-
- 2
-
-
- -
-
- 3
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
-
-
@@ -1928,33 +1742,10 @@
-
-
-
-
- 150
- 0
-
+
+
+
-
-
-
- 自动
-
-
- -
-
- cunet
-
-
- -
-
- photo
-
-
- -
-
- anime_style_art_rgb
-
-
-
@@ -2072,72 +1863,6 @@
- -
-
-
-
-
-
-
- 60
- 0
-
-
-
-
- 156
- 16777215
-
-
-
- 去噪等级
-
-
-
- -
-
-
-
- 150
- 0
-
-
-
-
-
- 0
-
-
- -
-
- 1
-
-
- -
-
- 2
-
-
- -
-
- 3
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
-
-
@@ -2160,33 +1885,10 @@
-
-
-
-
- 150
- 0
-
+
+
+
-
-
-
- 自动
-
-
- -
-
- cunet
-
-
- -
-
- photo
-
-
- -
-
- anime_style_art_rgb
-
-
-
@@ -2715,10 +2417,10 @@
-
-
+
+
diff --git a/ui/ui_waifu2x_tool.ui b/ui/ui_waifu2x_tool.ui
index c1c78ab..3256885 100644
--- a/ui/ui_waifu2x_tool.ui
+++ b/ui/ui_waifu2x_tool.ui
@@ -6,8 +6,8 @@
0
0
- 502
- 556
+ 705
+ 498
@@ -20,539 +20,519 @@
-
-
-
-
- Qt::Vertical
-
-
-
- -
-
-
-
-
-
- Qt::Vertical
-
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- waifu2x
-
-
- true
-
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- 画质提升,耗时增加
-
-
- tta模式
-
-
-
- -
-
-
-
-
-
-
- 100
- 16777215
-
-
-
- 倍数放大
-
-
- true
-
-
- buttonGroup_2
-
-
-
- -
-
-
-
- 160
- 16777215
-
-
-
- 2
-
-
- Qt::AlignCenter
-
-
-
-
-
- -
-
-
-
-
-
-
- 100
- 16777215
-
-
-
- 固定长宽
-
-
- buttonGroup_2
-
-
-
- -
-
-
- false
-
-
-
- 60
- 16777215
-
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
-
- 20
- 16777215
-
-
-
- X
-
-
-
- -
-
-
- false
-
-
-
- 60
- 16777215
-
-
-
- Qt::AlignCenter
-
-
-
-
-
- -
-
-
-
-
-
-
- 60
- 16777215
-
-
-
- 降噪:
-
-
-
- -
-
-
-
- 160
- 0
-
-
-
-
- 160
- 16777215
-
-
-
-
-
- 3
-
-
- -
-
- 2
-
-
- -
-
- 1
-
-
- -
-
- 0
-
-
- -
-
- -1
-
-
-
-
-
-
- -
-
-
-
-
-
-
- 60
- 16777215
-
-
-
- 模型:
-
-
-
- -
-
-
-
- 160
- 0
-
-
-
-
- 160
- 16777215
-
-
-
-
-
- cunet
-
-
- -
-
- photo
-
-
- -
-
- anime_style_art_rgb
-
-
-
-
-
-
- -
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- 转换
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
-
-
-
-
-
-
- 60
- 16777215
-
-
-
- 分辨率:
-
-
-
- -
-
-
-
- 160
- 16777215
-
-
-
- 无信息
-
-
-
-
-
- -
-
-
-
-
-
-
- 60
- 16777215
-
-
-
- 大 小:
-
-
-
- -
-
-
-
- 160
- 16777215
-
-
-
- 无信息
-
-
-
-
-
- -
-
-
-
-
-
-
- 60
- 16777215
-
-
-
- 转换模式:
-
-
-
- -
-
-
- GPU
-
-
- true
-
-
-
-
-
- -
-
-
-
-
-
-
- 60
- 16777215
-
-
-
- 格式
-
-
-
- -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- 60
- 16777215
-
-
-
- 耗时:
-
-
-
- -
-
-
-
- 160
- 16777215
-
-
-
-
-
-
-
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- 打开图片
-
-
-
- -
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- 缩小
-
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- 放大
-
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- 保存图片
-
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- 设置头像
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
- Qt::Vertical
-
-
+
+
- 20
- 40
+ 300
+ 16777215
-
-
- -
-
-
- Qt::Vertical
+
+ true
+
+
+
+ 0
+ 0
+ 275
+ 480
+
+
+
+
-
+
+
-
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+
+ 100
+ 16777215
+
+
+
+ waifu2x
+
+
+ true
+
+
+
+ -
+
+
+
+ 100
+ 16777215
+
+
+
+ 画质提升,耗时增加
+
+
+ tta模式
+
+
+
+ -
+
+
-
+
+
+
+ 100
+ 16777215
+
+
+
+ 倍数放大
+
+
+ true
+
+
+ buttonGroup_2
+
+
+
+ -
+
+
+
+ 160
+ 16777215
+
+
+
+ 2
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 100
+ 16777215
+
+
+
+ 固定长宽
+
+
+ buttonGroup_2
+
+
+
+ -
+
+
+ false
+
+
+
+ 60
+ 16777215
+
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 20
+ 16777215
+
+
+
+ X
+
+
+
+ -
+
+
+ false
+
+
+
+ 60
+ 16777215
+
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 60
+ 16777215
+
+
+
+ 模型:
+
+
+
+ -
+
+
+
+ 8
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 60
+ 16777215
+
+
+
+ 格式:
+
+
+
+ -
+
+
-
+
+ 自动
+
+
+ -
+
+ JPG
+
+
+ -
+
+ PNG
+
+
+ -
+
+ BMP
+
+
+ -
+
+ WEBP
+
+
+ -
+
+ GIF
+
+
+
+
+
+
+ -
+
+
+
+ 100
+ 16777215
+
+
+
+ 转换
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+ 60
+ 16777215
+
+
+
+ 分辨率:
+
+
+
+ -
+
+
+
+ 160
+ 16777215
+
+
+
+ 无信息
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 60
+ 16777215
+
+
+
+ 大 小:
+
+
+
+ -
+
+
+
+ 160
+ 16777215
+
+
+
+ 无信息
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 60
+ 16777215
+
+
+
+ 转换模式:
+
+
+
+ -
+
+
+
+ 150
+ 16777215
+
+
+
+ GPU
+
+
+ true
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 60
+ 16777215
+
+
+
+ 格式
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 60
+ 16777215
+
+
+
+ 耗时:
+
+
+
+ -
+
+
+
+ 160
+ 16777215
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 100
+ 16777215
+
+
+
+ 打开图片
+
+
+
+ -
+
+
+
+ 100
+ 16777215
+
+
+
+ 保存图片
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 100
+ 16777215
+
+
+
+ 放大
+
+
+
+ -
+
+
+
+ 100
+ 16777215
+
+
+
+ 缩小
+
+
+
+
+
+ -
+
+
+
+ 100
+ 16777215
+
+
+
+ 设置为头像
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+ SmoothScrollArea
+ QScrollArea
+ component.scroll_area.smooth_scroll_area.h
+ 1
+
+
@@ -731,22 +711,6 @@
-
- comboBox
- currentIndexChanged(int)
- Waifu2xTool
- ChangeModel()
-
-
- 488
- 181
-
-
- 386
- 335
-
-
-
changeButton
clicked()
@@ -763,22 +727,6 @@
-
- noiseCombox
- currentIndexChanged(int)
- Waifu2xTool
- CheckScaleRadio()
-
-
- 488
- 152
-
-
- 386
- 173
-
-
-
headButton
clicked()