-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,668 changed files
with
5,427 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Form implementation generated from reading ui file 'd:\wdAsst\ChangeStandardLexicon.ui' | ||
# | ||
# Created by: PyQt5 UI code generator 5.15.4 | ||
# | ||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is | ||
# run again. Do not edit this file unless you know what you are doing. | ||
|
||
|
||
from PyQt5 import QtCore, QtGui, QtWidgets | ||
|
||
|
||
class Ui_change_standard_lexicon(object): | ||
def setupUi(self, change_standard_lexicon): | ||
change_standard_lexicon.setObjectName("change_standard_lexicon") | ||
change_standard_lexicon.resize(360, 170) | ||
change_standard_lexicon.setMinimumSize(QtCore.QSize(360, 170)) | ||
change_standard_lexicon.setMaximumSize(QtCore.QSize(360, 170)) | ||
font = QtGui.QFont() | ||
font.setFamily("Microsoft YaHei") | ||
change_standard_lexicon.setFont(font) | ||
self.choose_lexicon = QtWidgets.QComboBox(change_standard_lexicon) | ||
self.choose_lexicon.setGeometry(QtCore.QRect(30, 60, 301, 31)) | ||
self.choose_lexicon.setObjectName("choose_lexicon") | ||
self.ok_btn = QtWidgets.QPushButton(change_standard_lexicon) | ||
self.ok_btn.setGeometry(QtCore.QRect(30, 110, 151, 31)) | ||
self.ok_btn.setObjectName("ok_btn") | ||
self.cancel_btn = QtWidgets.QPushButton(change_standard_lexicon) | ||
self.cancel_btn.setGeometry(QtCore.QRect(190, 110, 141, 31)) | ||
self.cancel_btn.setObjectName("cancel_btn") | ||
self.label = QtWidgets.QLabel(change_standard_lexicon) | ||
self.label.setGeometry(QtCore.QRect(30, 30, 101, 16)) | ||
font = QtGui.QFont() | ||
font.setFamily("Microsoft YaHei") | ||
font.setPointSize(11) | ||
self.label.setFont(font) | ||
self.label.setObjectName("label") | ||
|
||
self.retranslateUi(change_standard_lexicon) | ||
QtCore.QMetaObject.connectSlotsByName(change_standard_lexicon) | ||
|
||
def retranslateUi(self, change_standard_lexicon): | ||
_translate = QtCore.QCoreApplication.translate | ||
change_standard_lexicon.setWindowTitle(_translate("change_standard_lexicon", "更改标准词库")) | ||
self.ok_btn.setText(_translate("change_standard_lexicon", "确定")) | ||
self.cancel_btn.setText(_translate("change_standard_lexicon", "取消")) | ||
self.label.setText(_translate("change_standard_lexicon", "选择标准词库")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>change_standard_lexicon</class> | ||
<widget class="QDialog" name="change_standard_lexicon"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>360</width> | ||
<height>170</height> | ||
</rect> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>360</width> | ||
<height>170</height> | ||
</size> | ||
</property> | ||
<property name="maximumSize"> | ||
<size> | ||
<width>360</width> | ||
<height>170</height> | ||
</size> | ||
</property> | ||
<property name="font"> | ||
<font> | ||
<family>Microsoft YaHei</family> | ||
</font> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>更改标准词库</string> | ||
</property> | ||
<widget class="QComboBox" name="choose_lexicon"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>30</x> | ||
<y>60</y> | ||
<width>301</width> | ||
<height>31</height> | ||
</rect> | ||
</property> | ||
</widget> | ||
<widget class="QPushButton" name="ok_btn"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>30</x> | ||
<y>110</y> | ||
<width>151</width> | ||
<height>31</height> | ||
</rect> | ||
</property> | ||
<property name="text"> | ||
<string>确定</string> | ||
</property> | ||
</widget> | ||
<widget class="QPushButton" name="cancel_btn"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>190</x> | ||
<y>110</y> | ||
<width>141</width> | ||
<height>31</height> | ||
</rect> | ||
</property> | ||
<property name="text"> | ||
<string>取消</string> | ||
</property> | ||
</widget> | ||
<widget class="QLabel" name="label"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>30</x> | ||
<y>30</y> | ||
<width>101</width> | ||
<height>16</height> | ||
</rect> | ||
</property> | ||
<property name="font"> | ||
<font> | ||
<family>Microsoft YaHei</family> | ||
<pointsize>11</pointsize> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>选择标准词库</string> | ||
</property> | ||
</widget> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from PyQt5 import QtCore | ||
from PyQt5.QtWidgets import QDialog, QApplication | ||
|
||
import sys | ||
|
||
import ChangeStandardLexicon | ||
|
||
|
||
class ChildChangeStandardLexicon(QDialog): | ||
def __init__(self): | ||
super().__init__() | ||
# self.dialog_s = QDialog() | ||
self.status = False | ||
self.ui = ChangeStandardLexicon.Ui_change_standard_lexicon() | ||
self.ui.setupUi(self) | ||
self.ui.ok_btn.clicked.connect(self.ok_btn_clicked) | ||
self.ui.cancel_btn.clicked.connect(self.cancel_btn_clicked) | ||
self.setWindowFlags(QtCore.Qt.WindowTitleHint) | ||
self.cancelled = "cancelled" | ||
self.yes = "yes" | ||
self.status = self.cancelled | ||
self.chosen_lexicon_name = "" | ||
|
||
def load_contents(self, content_list, current_text): | ||
self.ui.choose_lexicon.clear() | ||
for i in content_list: | ||
self.ui.choose_lexicon.addItem(i[0]) | ||
print(current_text) | ||
self.ui.choose_lexicon.setCurrentText(current_text) | ||
self.status = self.cancelled | ||
|
||
def ok_btn_clicked(self): | ||
self.chosen_lexicon_name = self.ui.choose_lexicon.currentText() | ||
print(self.chosen_lexicon_name) | ||
self.status = self.yes | ||
self.close() | ||
|
||
def cancel_btn_clicked(self): | ||
self.status = self.cancelled | ||
self.close() | ||
|
||
|
||
if __name__ == "__main__": | ||
app = QApplication(sys.argv) | ||
dialog = ChildChangeStandardLexicon() | ||
dialog.show() | ||
sys.exit(app.exec_()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from PyQt5 import QtCore | ||
from PyQt5.QtWidgets import QDialog | ||
|
||
import ConfirmAddWord | ||
|
||
|
||
class ChildConfirmAddWord(QDialog): | ||
def __init__(self): | ||
super().__init__() | ||
# self.dialog_s = QDialog() | ||
self.status = False | ||
self.ui = ConfirmAddWord.Ui_ConfirmAddWord() | ||
self.ui.setupUi(self) | ||
self.ui.ok_btn.clicked.connect(self.set_sta_true) | ||
self.ui.cancel_btn.clicked.connect(self.set_sta_false) | ||
self.setWindowFlags(QtCore.Qt.WindowTitleHint) | ||
|
||
def set_words(self, word, group, pos, chinese_translation): | ||
self.set_sta_false() | ||
self.ui.eng_label.setText(word) | ||
self.ui.trans_box.clear() | ||
self.ui.trans_box.addItems([group, pos, chinese_translation]) | ||
|
||
def set_sta_true(self): | ||
self.status = True | ||
self.close() | ||
|
||
def set_sta_false(self): | ||
self.status = False | ||
self.close() | ||
|
||
def get_status(self): | ||
return self.status | ||
|
||
# def show_dialog(self): | ||
# d = ConfirmAddWord.Ui_ConfirmAddWord() | ||
# d.setupUi(self.dialog_s) | ||
# self.dialog_s.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
from PyQt5 import QtCore | ||
from PyQt5.QtWidgets import QDialog, QMessageBox | ||
|
||
import ManageGroupRename | ||
|
||
|
||
class ChildManageGroupRename(QDialog): | ||
def __init__(self): | ||
super().__init__() | ||
# self.dialog_s = QDialog() | ||
self.ui = ManageGroupRename.Ui_ManageGroupRename() | ||
self.ui.setupUi(self) | ||
self.setWindowFlags(QtCore.Qt.WindowTitleHint) | ||
self.existed_group = [] | ||
self.status = 1 # 0 - 选择确定,1 - 选择取消 | ||
self.ui.renameButton.clicked.connect(self.rename_button_clicked) | ||
self.ui.cancelButton.clicked.connect(self.cancel_button_clicked) | ||
|
||
def rename_button_clicked(self): | ||
self.status = 0 | ||
if self.ui.newName.text().strip() == "": | ||
QMessageBox.warning( | ||
self, | ||
"词库新命名为空", | ||
"词库新命名为空,请重新输入!") | ||
elif self.ui.newName.text().strip() in self.existed_group: | ||
QMessageBox.warning( | ||
self, | ||
"该词库名称已存在", | ||
"该词库名称已存在,请重新输入!") | ||
else: | ||
self.close() | ||
|
||
def cancel_button_clicked(self): | ||
self.status = 1 | ||
self.close() | ||
|
||
def set_content(self, origin_name, existed_group): | ||
self.ui.originName.clear() | ||
self.ui.newName.clear() | ||
self.ui.originName.setText(origin_name) | ||
self.existed_group = existed_group | ||
self.status = 1 | ||
|
||
def return_current_text(self): | ||
if self.status == 0: | ||
return self.ui.newName.text() | ||
else: | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
from PyQt5 import QtCore | ||
from PyQt5.QtWidgets import QDialog | ||
|
||
import PronExistedDialog | ||
|
||
|
||
class ChildPronExisted(QDialog): | ||
def __init__(self): | ||
super().__init__() | ||
# self.dialog_s = QDialog() | ||
self.status = False | ||
self.ui = PronExistedDialog.Ui_PronExistedDialog() | ||
self.ui.setupUi(self) | ||
self.setWindowFlags(QtCore.Qt.WindowTitleHint) | ||
|
||
self.clicked_status = 4 | ||
# 绑定点击事件 | ||
self.ui.update_all.clicked.connect(self.update_all) # clicked_status = 1 | ||
self.ui.update_bre.clicked.connect(self.update_bre) # clicked_status = 2 | ||
self.ui.update_ame.clicked.connect(self.update_ame) # clicked_status = 3 | ||
self.ui.update_none.clicked.connect(self.update_none) # clicked_status = 4 | ||
|
||
def set_dialog_value(self, word, old_bre="", old_ame="", new_bre="", new_ame=""): | ||
self.clicked_status = 4 | ||
self.ui.operate_word.clear() | ||
self.ui.old_bre.clear() | ||
self.ui.old_ame.clear() | ||
self.ui.new_bre.clear() | ||
self.ui.new_ame.clear() | ||
self.ui.operate_word.setText(word) | ||
self.ui.old_bre.setText(old_bre) | ||
self.ui.old_ame.setText(old_ame) | ||
self.ui.new_bre.setText(new_bre) | ||
self.ui.new_ame.setText(new_ame) | ||
|
||
def update_all(self): | ||
self.clicked_status = 1 | ||
self.close() | ||
|
||
def update_bre(self): | ||
self.clicked_status = 2 | ||
self.close() | ||
|
||
def update_ame(self): | ||
self.clicked_status = 3 | ||
self.close() | ||
|
||
def update_none(self): | ||
self.clicked_status = 4 | ||
self.close() | ||
|
||
def get_clicked_status(self): | ||
return self.clicked_status | ||
|
||
# def show_dialog(self): | ||
# d = PronExistedDialog.Ui_PronExistedDialog() | ||
# d.setupUi(self.dialog_s) | ||
# self.dialog_s.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Form implementation generated from reading ui file 'ConfirmAddWord.ui' | ||
# | ||
# Created by: PyQt5 UI code generator 5.15.4 | ||
# | ||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is | ||
# run again. Do not edit this file unless you know what you are doing. | ||
|
||
|
||
from PyQt5 import QtCore, QtGui, QtWidgets | ||
|
||
|
||
class Ui_ConfirmAddWord(object): | ||
def setupUi(self, ConfirmAddWord): | ||
ConfirmAddWord.setObjectName("ConfirmAddWord") | ||
ConfirmAddWord.resize(380, 250) | ||
ConfirmAddWord.setMinimumSize(QtCore.QSize(380, 250)) | ||
ConfirmAddWord.setMaximumSize(QtCore.QSize(380, 250)) | ||
self.trans_box = QtWidgets.QListWidget(ConfirmAddWord) | ||
self.trans_box.setGeometry(QtCore.QRect(19, 60, 341, 141)) | ||
self.trans_box.setWordWrap(True) | ||
self.trans_box.setObjectName("trans_box") | ||
self.eng_label = QtWidgets.QTextEdit(ConfirmAddWord) | ||
self.eng_label.setGeometry(QtCore.QRect(19, 20, 341, 31)) | ||
font = QtGui.QFont() | ||
font.setFamily("Times New Roman") | ||
font.setPointSize(12) | ||
font.setBold(True) | ||
font.setWeight(75) | ||
self.eng_label.setFont(font) | ||
self.eng_label.setReadOnly(True) | ||
self.eng_label.setObjectName("eng_label") | ||
self.widget = QtWidgets.QWidget(ConfirmAddWord) | ||
self.widget.setGeometry(QtCore.QRect(200, 210, 158, 25)) | ||
self.widget.setObjectName("widget") | ||
self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget) | ||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0) | ||
self.horizontalLayout.setObjectName("horizontalLayout") | ||
self.ok_btn = QtWidgets.QPushButton(self.widget) | ||
self.ok_btn.setObjectName("ok_btn") | ||
self.operate_btn = QtWidgets.QButtonGroup(ConfirmAddWord) | ||
self.operate_btn.setObjectName("operate_btn") | ||
self.operate_btn.addButton(self.ok_btn) | ||
self.horizontalLayout.addWidget(self.ok_btn) | ||
self.cancel_btn = QtWidgets.QPushButton(self.widget) | ||
self.cancel_btn.setObjectName("cancel_btn") | ||
self.operate_btn.addButton(self.cancel_btn) | ||
self.horizontalLayout.addWidget(self.cancel_btn) | ||
|
||
self.retranslateUi(ConfirmAddWord) | ||
QtCore.QMetaObject.connectSlotsByName(ConfirmAddWord) | ||
|
||
def retranslateUi(self, ConfirmAddWord): | ||
_translate = QtCore.QCoreApplication.translate | ||
ConfirmAddWord.setWindowTitle(_translate("ConfirmAddWord", "确认添加的单词信息")) | ||
self.ok_btn.setText(_translate("ConfirmAddWord", "添加")) | ||
self.cancel_btn.setText(_translate("ConfirmAddWord", "取消")) |
Oops, something went wrong.