mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-22 19:02:17 +08:00
commit
d8639ede91
@ -4,10 +4,11 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="84e65474-7da9-466d-baf3-cc88dde3ffdd" name="变更" comment="删除多余的Word文件">
|
||||
<list default="true" id="84e65474-7da9-466d-baf3-cc88dde3ffdd" name="变更" comment="新增聊天记录导出csv格式">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/decrypt/get_wx_info.py" beforeDir="false" afterPath="$PROJECT_DIR$/app/decrypt/get_wx_info.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/log/logger.py" beforeDir="false" afterPath="$PROJECT_DIR$/app/log/logger.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/DataBase/micro_msg.py" beforeDir="false" afterPath="$PROJECT_DIR$/app/DataBase/micro_msg.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/DataBase/msg.py" beforeDir="false" afterPath="$PROJECT_DIR$/app/DataBase/msg.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/ui_pc/mainview.py" beforeDir="false" afterPath="$PROJECT_DIR$/app/ui_pc/mainview.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -28,6 +29,11 @@
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="PUSH_AUTO_UPDATE" value="true" />
|
||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$" value="master" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
<option name="SWAP_SIDES_IN_COMPARE_BRANCHES" value="true" />
|
||||
</component>
|
||||
@ -38,6 +44,29 @@
|
||||
}</component>
|
||||
<component name="GitToolBoxStore">
|
||||
<option name="projectConfigVersion" value="5" />
|
||||
<option name="recentBranches">
|
||||
<RecentBranches>
|
||||
<option name="branchesForRepo">
|
||||
<list>
|
||||
<RecentBranchesForRepo>
|
||||
<option name="branches">
|
||||
<list>
|
||||
<RecentBranch>
|
||||
<option name="branchName" value="dev_zsk" />
|
||||
<option name="lastUsedInstant" value="1700046130" />
|
||||
</RecentBranch>
|
||||
<RecentBranch>
|
||||
<option name="branchName" value="master" />
|
||||
<option name="lastUsedInstant" value="1700046129" />
|
||||
</RecentBranch>
|
||||
</list>
|
||||
</option>
|
||||
<option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
|
||||
</RecentBranchesForRepo>
|
||||
</list>
|
||||
</option>
|
||||
</RecentBranches>
|
||||
</option>
|
||||
</component>
|
||||
<component name="GithubPullRequestsUISettings">
|
||||
<option name="selectedUrlAndAccountId">
|
||||
@ -70,31 +99,12 @@
|
||||
}</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="D:\Project\Python\WeChatMsg\app\ui_pc\tool" />
|
||||
<recent name="D:\Project\Python\WeChatMsg\app\" />
|
||||
<recent name="D:\Project\PythonProject\WeChatMsg\app\Ui" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager" selected="Python.decrypt_window">
|
||||
<configuration name="decrypt" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<module name="WeChatMsg" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/app/decrypt" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/app/decrypt/decrypt.py" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="decrypt_window" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<module name="WeChatMsg" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
@ -116,27 +126,6 @@
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="get_wx_info" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<module name="WeChatMsg" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/app/decrypt" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/app/decrypt/get_wx_info.py" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="main" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<module name="WeChatMsg" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
@ -152,13 +141,13 @@
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main.py" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="micro_msg (1)" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<configuration name="misc" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<module name="WeChatMsg" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@ -170,7 +159,28 @@
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/app/DataBase/micro_msg.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/app/DataBase/misc.py" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="msg" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<module name="WeChatMsg" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/app/DataBase" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/app/DataBase/msg.py" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
@ -200,13 +210,34 @@
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="test" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<module name="WeChatMsg" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test.py" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Python.decrypt_window" />
|
||||
<item itemvalue="Python.msg" />
|
||||
<item itemvalue="Python.test" />
|
||||
<item itemvalue="Python.main" />
|
||||
<item itemvalue="Python.decrypt" />
|
||||
<item itemvalue="Python.get_wx_info" />
|
||||
<item itemvalue="Python.micro_msg (1)" />
|
||||
<item itemvalue="Python.misc" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
@ -222,62 +253,6 @@
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1672848140146</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00009" summary="聊天统计">
|
||||
<created>1675168912759</created>
|
||||
<option name="number" value="00009" />
|
||||
<option name="presentableId" value="LOCAL-00009" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1675168912759</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00010" summary="聊天统计">
|
||||
<created>1675169020409</created>
|
||||
<option name="number" value="00010" />
|
||||
<option name="presentableId" value="LOCAL-00010" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1675169020409</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00011" summary="优化加载页面">
|
||||
<created>1675268807882</created>
|
||||
<option name="number" value="00011" />
|
||||
<option name="presentableId" value="LOCAL-00011" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1675268807882</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00012" summary="优化加载页面">
|
||||
<created>1678034382207</created>
|
||||
<option name="number" value="00012" />
|
||||
<option name="presentableId" value="LOCAL-00012" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1678034382207</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00013" summary="修复部分bug">
|
||||
<created>1680232548867</created>
|
||||
<option name="number" value="00013" />
|
||||
<option name="presentableId" value="LOCAL-00013" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1680232548867</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00014" summary="新增对话情感分析,增加窗口自适应,新增emotion界面">
|
||||
<created>1680441801589</created>
|
||||
<option name="number" value="00014" />
|
||||
<option name="presentableId" value="LOCAL-00014" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1680441801589</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00015" summary="烂了">
|
||||
<created>1680624068689</created>
|
||||
<option name="number" value="00015" />
|
||||
<option name="presentableId" value="LOCAL-00015" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1680624068689</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00016" summary="窗口切换,使用stackedWidget">
|
||||
<created>1680630659802</created>
|
||||
<option name="number" value="00016" />
|
||||
<option name="presentableId" value="LOCAL-00016" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1680630659802</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00017" summary="修复了Webengine横向小的问题">
|
||||
<created>1680670947385</created>
|
||||
<option name="number" value="00017" />
|
||||
@ -565,7 +540,63 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1699973865386</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="58" />
|
||||
<task id="LOCAL-00058" summary="修复无法查找wxid的bug">
|
||||
<created>1700046106844</created>
|
||||
<option name="number" value="00058" />
|
||||
<option name="presentableId" value="LOCAL-00058" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700046106844</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00059" summary="修改UI">
|
||||
<created>1700052873083</created>
|
||||
<option name="number" value="00059" />
|
||||
<option name="presentableId" value="LOCAL-00059" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700052873083</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00060" summary="新增联系人头像组件">
|
||||
<created>1700056651470</created>
|
||||
<option name="number" value="00060" />
|
||||
<option name="presentableId" value="LOCAL-00060" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700056651470</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00061" summary="头像支持显示二进制">
|
||||
<created>1700058733119</created>
|
||||
<option name="number" value="00061" />
|
||||
<option name="presentableId" value="LOCAL-00061" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700058733119</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00062" summary="显示联系人信息">
|
||||
<created>1700060367255</created>
|
||||
<option name="number" value="00062" />
|
||||
<option name="presentableId" value="LOCAL-00062" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700060367255</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00063" summary="修复db文件空格路径的bug">
|
||||
<created>1700063620952</created>
|
||||
<option name="number" value="00063" />
|
||||
<option name="presentableId" value="LOCAL-00063" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700063620952</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00064" summary="修复情感分析数值显示过长的bug">
|
||||
<created>1700064404522</created>
|
||||
<option name="number" value="00064" />
|
||||
<option name="presentableId" value="LOCAL-00064" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700064404522</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00065" summary="新增聊天记录导出csv格式">
|
||||
<created>1700145601841</created>
|
||||
<option name="number" value="00065" />
|
||||
<option name="presentableId" value="LOCAL-00065" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700145601841</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="66" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="UnknownFeatures">
|
||||
@ -601,14 +632,6 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="新增聊天报告" />
|
||||
<MESSAGE value="readme" />
|
||||
<MESSAGE value="mainwindows文件修正" />
|
||||
<MESSAGE value="match语法说明" />
|
||||
<MESSAGE value="增加群二维码" />
|
||||
<MESSAGE value="支持导出csv格式聊天记录" />
|
||||
<MESSAGE value="重构一些class,删除一些不必要的文件" />
|
||||
<MESSAGE value="用stackedWidget实现导航栏" />
|
||||
<MESSAGE value="修复部分bug" />
|
||||
<MESSAGE value="替换chat里的contact" />
|
||||
<MESSAGE value="增加中文路径提示" />
|
||||
@ -626,7 +649,15 @@
|
||||
<MESSAGE value="update readme" />
|
||||
<MESSAGE value="增加PC端微信解密条件的判断" />
|
||||
<MESSAGE value="删除多余的Word文件" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="删除多余的Word文件" />
|
||||
<MESSAGE value="修复无法查找wxid的bug" />
|
||||
<MESSAGE value="修改UI" />
|
||||
<MESSAGE value="新增联系人头像组件" />
|
||||
<MESSAGE value="头像支持显示二进制" />
|
||||
<MESSAGE value="显示联系人信息" />
|
||||
<MESSAGE value="修复db文件空格路径的bug" />
|
||||
<MESSAGE value="修复情感分析数值显示过长的bug" />
|
||||
<MESSAGE value="新增聊天记录导出csv格式" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="新增聊天记录导出csv格式" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
|
||||
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
||||
</component>
|
||||
|
@ -1,9 +1,27 @@
|
||||
import os.path
|
||||
import sqlite3
|
||||
from pprint import pprint
|
||||
|
||||
DB = sqlite3.connect("./de_MicroMsg.db", check_same_thread=False)
|
||||
# '''创建游标'''
|
||||
cursor = DB.cursor()
|
||||
DB = None
|
||||
cursor = None
|
||||
micromsg_path = "./app/Database/Msg/MicroMsg.db"
|
||||
if os.path.exists(micromsg_path):
|
||||
DB = sqlite3.connect(micromsg_path, check_same_thread=False)
|
||||
# '''创建游标'''
|
||||
cursor = DB.cursor()
|
||||
|
||||
|
||||
def init_database():
|
||||
global DB
|
||||
global cursor
|
||||
if not DB:
|
||||
if os.path.exists(micromsg_path):
|
||||
DB = sqlite3.connect(micromsg_path, check_same_thread=False)
|
||||
# '''创建游标'''
|
||||
cursor = DB.cursor()
|
||||
|
||||
|
||||
def is_database_exist():
|
||||
return os.path.exists(micromsg_path)
|
||||
|
||||
|
||||
def get_contact():
|
||||
@ -14,10 +32,16 @@ def get_contact():
|
||||
'''
|
||||
cursor.execute(sql)
|
||||
result = cursor.fetchall()
|
||||
pprint(result)
|
||||
print(len(result))
|
||||
# pprint(result)
|
||||
# print(len(result))
|
||||
return result
|
||||
|
||||
|
||||
def close():
|
||||
global DB
|
||||
if DB:
|
||||
DB.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
get_contact()
|
||||
|
29
app/DataBase/misc.py
Normal file
29
app/DataBase/misc.py
Normal file
@ -0,0 +1,29 @@
|
||||
import os.path
|
||||
import sqlite3
|
||||
|
||||
DB = None
|
||||
cursor = None
|
||||
misc_path = "./app/Database/Msg/Misc.db"
|
||||
# misc_path = './Msg/Misc.db'
|
||||
if os.path.exists(misc_path):
|
||||
DB = sqlite3.connect(misc_path, check_same_thread=False)
|
||||
# '''创建游标'''
|
||||
cursor = DB.cursor()
|
||||
|
||||
|
||||
def get_avatar_buffer(userName):
|
||||
sql = '''
|
||||
select smallHeadBuf
|
||||
from ContactHeadImg1
|
||||
where usrName=?;
|
||||
'''
|
||||
cursor.execute(sql, [userName])
|
||||
result = cursor.fetchall()
|
||||
# print(result[0][0])
|
||||
if result:
|
||||
return result[0][0]
|
||||
return None
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
get_avatar_buffer('wxid_al2oan01b6fn11')
|
71
app/DataBase/msg.py
Normal file
71
app/DataBase/msg.py
Normal file
@ -0,0 +1,71 @@
|
||||
import os.path
|
||||
import re
|
||||
import sqlite3
|
||||
|
||||
DB = []
|
||||
cursor = []
|
||||
msg_root_path = "./app/Database/Msg/"
|
||||
# misc_path = './Msg/Misc.db'
|
||||
if os.path.exists(msg_root_path):
|
||||
for root, dirs, files in os.walk(msg_root_path):
|
||||
for file in files:
|
||||
if re.match('^MSG[0-9]+\.db$', file):
|
||||
# print('ok', file)
|
||||
msg_path = os.path.join(msg_root_path, file)
|
||||
DB0 = sqlite3.connect(msg_path, check_same_thread=False)
|
||||
# '''创建游标'''
|
||||
cursor0 = DB0.cursor()
|
||||
DB.append(DB0)
|
||||
cursor.append(cursor0)
|
||||
|
||||
|
||||
def init_database():
|
||||
global DB
|
||||
global cursor
|
||||
if not DB:
|
||||
if os.path.exists(msg_root_path):
|
||||
for root, dirs, files in os.walk(msg_root_path):
|
||||
for file in files:
|
||||
# print(file)
|
||||
if re.match('^MSG[0-9]+\.db$', file):
|
||||
print('ok', file)
|
||||
msg_path = os.path.join(msg_root_path, file)
|
||||
DB0 = sqlite3.connect(msg_path, check_same_thread=False)
|
||||
# '''创建游标'''
|
||||
cursor0 = DB0.cursor()
|
||||
DB.append(DB0)
|
||||
cursor.append(cursor0)
|
||||
|
||||
|
||||
def get_messages(username_):
|
||||
sql = '''
|
||||
select localId,TalkerId,Type,SubType,IsSender,CreateTime,Status,StrContent,strftime('%Y-%m-%d %H:%M:%S',CreateTime,'unixepoch','localtime') as StrTime
|
||||
from MSG
|
||||
where StrTalker=?
|
||||
order by CreateTime
|
||||
'''
|
||||
result = []
|
||||
for cur in cursor:
|
||||
cur.execute(sql, [username_])
|
||||
result_ = cur.fetchall()
|
||||
# print(len(result))
|
||||
result += result_
|
||||
result.sort(key=lambda x: x[5])
|
||||
return result
|
||||
|
||||
|
||||
def close():
|
||||
for db in DB:
|
||||
db.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from pprint import pprint
|
||||
|
||||
msg_root_path = './Msg/'
|
||||
init_database()
|
||||
|
||||
username = 'wxid_0o18ef858vnu22'
|
||||
result = get_messages(username)
|
||||
pprint(result)
|
||||
pprint(len(result))
|
56
app/DataBase/output_pc.py
Normal file
56
app/DataBase/output_pc.py
Normal file
@ -0,0 +1,56 @@
|
||||
import os
|
||||
|
||||
import pandas as pd
|
||||
from PyQt5.QtCore import pyqtSignal, QThread
|
||||
|
||||
from . import msg
|
||||
from ..log import log
|
||||
|
||||
|
||||
class Output(QThread):
|
||||
"""
|
||||
发送信息线程
|
||||
"""
|
||||
progressSignal = pyqtSignal(int)
|
||||
rangeSignal = pyqtSignal(int)
|
||||
okSignal = pyqtSignal(int)
|
||||
i = 1
|
||||
CSV = 0
|
||||
DOCX = 1
|
||||
HTML = 2
|
||||
|
||||
def __init__(self, contact, parent=None, type_=DOCX):
|
||||
super().__init__(parent)
|
||||
self.sec = 2 # 默认1000秒
|
||||
self.contact = contact
|
||||
self.ta_username = contact.wxid
|
||||
self.msg_id = 0
|
||||
self.output_type = type_
|
||||
self.total_num = 0
|
||||
self.num = 0
|
||||
|
||||
@log
|
||||
def to_csv(self, conRemark, path):
|
||||
origin_docx_path = f"{os.path.abspath('.')}/data/聊天记录/{self.contact.remark}"
|
||||
if not os.path.exists(origin_docx_path):
|
||||
os.mkdir(origin_docx_path)
|
||||
filename = f"{os.path.abspath('.')}/data/聊天记录/{self.contact.remark}/{self.contact.remark}.csv"
|
||||
# columns = ["用户名", "消息内容", "发送时间", "发送状态", "消息类型", "isSend", "msgId"]
|
||||
columns = ['localId', 'TalkerId', 'Type', 'SubType',
|
||||
'IsSender', 'CreateTime', 'Status', 'StrContent',
|
||||
'StrTime']
|
||||
messages = msg.get_messages(self.contact.wxid)
|
||||
# print()
|
||||
df = pd.DataFrame(
|
||||
data=messages,
|
||||
columns=columns,
|
||||
)
|
||||
df.to_csv(filename, encoding='utf-8')
|
||||
self.okSignal.emit('ok')
|
||||
|
||||
def run(self):
|
||||
if self.output_type == self.DOCX:
|
||||
return
|
||||
elif self.output_type == self.CSV:
|
||||
# print("线程导出csv")
|
||||
self.to_csv(self.ta_username, "path")
|
@ -13,6 +13,5 @@ from app.Ui import mainview
|
||||
# 文件__init__.py
|
||||
# from login import login
|
||||
from app.Ui.decrypt import decrypt
|
||||
from app.Ui.pc_decrypt import pc_decrypt
|
||||
|
||||
__all__ = ["decrypt", 'mainview', 'chat', 'pc_decrypt']
|
||||
__all__ = ["decrypt", 'mainview', 'chat']
|
||||
|
@ -17,7 +17,7 @@ from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from app.Ui.MyComponents.Button_Contact import ContactUi
|
||||
from app.components.Button_Contact import ContactUi
|
||||
from app.log import logger, log
|
||||
from .chatUi import *
|
||||
from ...DataBase import data
|
||||
|
@ -13,7 +13,7 @@ from PyQt5 import QtCore
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
import app.Ui.MyComponents.Button_Contact as MyLabel
|
||||
import app.components.Button_Contact as MyLabel
|
||||
from app import person
|
||||
from app.DataBase import data
|
||||
from app.Ui.contact.contactInfo import ContactInfo
|
||||
|
@ -32,6 +32,7 @@ def emotion_analysis(wxid):
|
||||
emotions.append(s / len(messages))
|
||||
emotions = np.array(emotions)
|
||||
emotions = np.around(emotions, 3) * 100
|
||||
emotions = np.around(emotions, 1)
|
||||
return dates, emotions
|
||||
|
||||
|
||||
|
@ -51,7 +51,11 @@ class DecryptControl(QWidget, decryptUi.Ui_Dialog):
|
||||
def get_db(self):
|
||||
self.db_path, _ = QFileDialog.getOpenFileName(self, 'Open file', r'..', "Database files (*.db)")
|
||||
if self.db_path:
|
||||
if self.db_path.isascii():
|
||||
if ' ' in self.db_path:
|
||||
self.label_db.setText('数据库未就绪')
|
||||
QMessageBox.critical(self, "错误", "db文件路径请不要带有空格\n可以放在D:\\\\data 目录下")
|
||||
self.db_path = ''
|
||||
elif self.db_path.isascii():
|
||||
self.label_db.setText('数据库已就绪')
|
||||
return self.db_path
|
||||
else:
|
||||
|
@ -11,13 +11,14 @@ from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from app import person, config
|
||||
from app.DataBase import *
|
||||
from app import config
|
||||
from app.DataBase import data
|
||||
from app.Ui import mainwindow
|
||||
from app.Ui.Icon import Icon
|
||||
from app.Ui.MyComponents.prompt_bar import PromptBar
|
||||
from app.Ui.chat import chat
|
||||
from app.Ui.contact import contact
|
||||
from app.components.prompt_bar import PromptBar
|
||||
from app.person import Me
|
||||
|
||||
|
||||
class MainWinController(QMainWindow, mainwindow.Ui_MainWindow):
|
||||
@ -28,9 +29,9 @@ class MainWinController(QMainWindow, mainwindow.Ui_MainWindow):
|
||||
super(MainWinController, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.setWindowIcon(Icon.MainWindow_Icon)
|
||||
self.Me = person.Me(data.get_myinfo())
|
||||
self.setAttribute(Qt.WA_AttributeCount)
|
||||
|
||||
self.setAttribute(Qt.WA_AttributeCount)
|
||||
self.Me = Me(data.get_myinfo())
|
||||
self.chatView = chat.ChatController(self.Me, parent=None)
|
||||
self.lay = QHBoxLayout()
|
||||
self.page_chat.setLayout(self.lay)
|
||||
@ -60,12 +61,6 @@ class MainWinController(QMainWindow, mainwindow.Ui_MainWindow):
|
||||
self.statusbar.setVisible(False)
|
||||
self.prompt_bar = PromptBar(self)
|
||||
self.chat_view()
|
||||
# self.state_lable = QLabel(self)
|
||||
# self.state_lable.raise_()
|
||||
# pixmap = QPixmap('./app/data/icons/default_avatar.svg').scaled(32, 32) # 按指定路径找到图片
|
||||
# self.state_lable.setPixmap(pixmap)
|
||||
# self.state_lable.setText("T")
|
||||
# 创建右键菜单函数
|
||||
|
||||
def init_ui(self):
|
||||
# self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
|
||||
|
@ -1,120 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'decryptUi.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# 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_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(400, 300)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("微软雅黑")
|
||||
Dialog.setFont(font)
|
||||
self.label_3 = QtWidgets.QLabel(Dialog)
|
||||
self.label_3.setGeometry(QtCore.QRect(140, 0, 221, 51))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("一纸情书")
|
||||
font.setPointSize(20)
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.progressBar = QtWidgets.QProgressBar(Dialog)
|
||||
self.progressBar.setGeometry(QtCore.QRect(90, 260, 271, 23))
|
||||
self.progressBar.setProperty("value", 50)
|
||||
self.progressBar.setObjectName("progressBar")
|
||||
self.btn_getinfo = QtWidgets.QPushButton(Dialog)
|
||||
self.btn_getinfo.setGeometry(QtCore.QRect(290, 60, 91, 41))
|
||||
self.btn_getinfo.setObjectName("btn_getinfo")
|
||||
self.btn_db_dir = QtWidgets.QPushButton(Dialog)
|
||||
self.btn_db_dir.setGeometry(QtCore.QRect(20, 210, 91, 41))
|
||||
self.btn_db_dir.setObjectName("btn_db_dir")
|
||||
self.label_db_dir = QtWidgets.QLabel(Dialog)
|
||||
self.label_db_dir.setGeometry(QtCore.QRect(120, 220, 251, 21))
|
||||
self.label_db_dir.setText("")
|
||||
self.label_db_dir.setObjectName("label_db_dir")
|
||||
self.label_ready = QtWidgets.QLabel(Dialog)
|
||||
self.label_ready.setGeometry(QtCore.QRect(40, 260, 41, 21))
|
||||
self.label_ready.setObjectName("label_ready")
|
||||
self.layoutWidget = QtWidgets.QWidget(Dialog)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(20, 50, 221, 151))
|
||||
self.layoutWidget.setObjectName("layoutWidget")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.layoutWidget)
|
||||
self.gridLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label.setObjectName("label")
|
||||
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
|
||||
self.label_2 = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||
self.label_5 = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.gridLayout.addWidget(self.label_5, 3, 0, 1, 1)
|
||||
self.label_4 = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
|
||||
self.label_key = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_key.setText("")
|
||||
self.label_key.setObjectName("label_key")
|
||||
self.gridLayout.addWidget(self.label_key, 5, 1, 1, 1)
|
||||
self.label_phone = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_phone.setText("")
|
||||
self.label_phone.setObjectName("label_phone")
|
||||
self.gridLayout.addWidget(self.label_phone, 2, 1, 1, 1)
|
||||
self.label_6 = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_6.setObjectName("label_6")
|
||||
self.gridLayout.addWidget(self.label_6, 5, 0, 1, 1)
|
||||
self.label_pid = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_pid.setText("")
|
||||
self.label_pid.setObjectName("label_pid")
|
||||
self.gridLayout.addWidget(self.label_pid, 0, 1, 1, 1)
|
||||
self.label_name = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_name.setText("")
|
||||
self.label_name.setObjectName("label_name")
|
||||
self.gridLayout.addWidget(self.label_name, 3, 1, 1, 1)
|
||||
self.label_7 = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_7.setObjectName("label_7")
|
||||
self.gridLayout.addWidget(self.label_7, 1, 0, 1, 1)
|
||||
self.label_version = QtWidgets.QLabel(self.layoutWidget)
|
||||
self.label_version.setText("")
|
||||
self.label_version.setObjectName("label_version")
|
||||
self.gridLayout.addWidget(self.label_version, 1, 1, 1, 1)
|
||||
self.lineEdit = QtWidgets.QLineEdit(self.layoutWidget)
|
||||
self.lineEdit.setStyleSheet("background:transparent;border-width:0;border-style:outset")
|
||||
self.lineEdit.setFrame(False)
|
||||
self.lineEdit.setObjectName("lineEdit")
|
||||
self.gridLayout.addWidget(self.lineEdit, 4, 1, 1, 1)
|
||||
self.gridLayout.setColumnMinimumWidth(0, 1)
|
||||
self.gridLayout.setColumnMinimumWidth(1, 2)
|
||||
self.gridLayout.setRowMinimumHeight(5, 10)
|
||||
self.gridLayout.setColumnStretch(0, 1)
|
||||
self.gridLayout.setColumnStretch(1, 3)
|
||||
self.gridLayout.setRowStretch(5, 10)
|
||||
self.pushButton_3 = QtWidgets.QPushButton(Dialog)
|
||||
self.pushButton_3.setGeometry(QtCore.QRect(290, 130, 91, 41))
|
||||
self.pushButton_3.setObjectName("pushButton_3")
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.label_3.setText(_translate("Dialog", "解密数据库"))
|
||||
self.btn_getinfo.setText(_translate("Dialog", "获取信息"))
|
||||
self.btn_db_dir.setText(_translate("Dialog", "设置微信路径"))
|
||||
self.label_ready.setText(_translate("Dialog", "未就绪"))
|
||||
self.label.setText(_translate("Dialog", "PID"))
|
||||
self.label_2.setText(_translate("Dialog", "手机号"))
|
||||
self.label_5.setText(_translate("Dialog", "微信昵称"))
|
||||
self.label_4.setText(_translate("Dialog", "wxid"))
|
||||
self.label_6.setText(_translate("Dialog", "密钥"))
|
||||
self.label_7.setText(_translate("Dialog", "版本"))
|
||||
self.pushButton_3.setText(_translate("Dialog", "开始解密"))
|
@ -1,221 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>0</y>
|
||||
<width>221</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>一纸情书</family>
|
||||
<pointsize>20</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>解密数据库</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>260</y>
|
||||
<width>271</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btn_getinfo">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>60</y>
|
||||
<width>91</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>获取信息</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btn_db_dir">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>210</y>
|
||||
<width>91</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>设置微信路径</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_db_dir">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>220</y>
|
||||
<width>251</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_ready">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>260</y>
|
||||
<width>41</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>未就绪</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>221</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,10" columnstretch="1,3"
|
||||
rowminimumheight="0,0,0,0,0,10" columnminimumwidth="1,2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>PID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>手机号</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>微信昵称</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>wxid</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_key">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_phone">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>密钥</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_pid">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_name">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>版本</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_version">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:transparent;border-width:0;border-style:outset</string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>130</y>
|
||||
<width>91</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>开始解密</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
297
app/components/CAvatar.py
Normal file
297
app/components/CAvatar.py
Normal file
File diff suppressed because one or more lines are too long
1
app/components/__init__.py
Normal file
1
app/components/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .contact_info_ui import ContactQListWidgetItem
|
87
app/components/bubble_message.py
Normal file
87
app/components/bubble_message.py
Normal file
@ -0,0 +1,87 @@
|
||||
from Lib import QtNinePatch2
|
||||
|
||||
from PyQt5.QtCore import Qt, QRectF
|
||||
from PyQt5.QtGui import QImage, QPainter, QColor, QFont, QPixmap
|
||||
from PyQt5.QtWidgets import QLabel, QWidget, QHBoxLayout, QVBoxLayout, QSizePolicy
|
||||
|
||||
|
||||
class Label(QLabel):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Label, self).__init__()
|
||||
# .9 格式的图片
|
||||
filp = kwargs.get('filp')
|
||||
self.image = QImage('Data/skin_aio_friend_bubble_pressed.9.png')
|
||||
if filp:
|
||||
self.image = self.image.mirrored(True, False)
|
||||
self.txt = kwargs.get('text')
|
||||
self.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
|
||||
self.adjustSize()
|
||||
|
||||
def showEvent(self, event):
|
||||
super(Label, self).showEvent(event)
|
||||
pixmap = QtNinePatch2.createPixmapFromNinePatchImage(
|
||||
self.image, self.width(), self.height())
|
||||
self.setPixmap(pixmap)
|
||||
|
||||
#
|
||||
def paintEvent(self, event) -> None:
|
||||
super(Label, self).paintEvent(event)
|
||||
painter = QPainter(self)
|
||||
painter.begin(self)
|
||||
painter.setPen(QColor(150, 100, 23))
|
||||
painter.setFont(QFont('SimSun', 20))
|
||||
painter.setRenderHint(QPainter.Antialiasing)
|
||||
painter.setRenderHint(QPainter.SmoothPixmapTransform)
|
||||
rec = QRectF(30, 40, self.width() - 60, self.height() - 60)
|
||||
painter.drawText(rec, Qt.TextWordWrap, self.txt)
|
||||
painter.end()
|
||||
|
||||
#
|
||||
def resizeEvent(self, event):
|
||||
super(Label, self).resizeEvent(event)
|
||||
pixmap = QtNinePatch2.createPixmapFromNinePatchImage(
|
||||
self.image, self.width(), self.height())
|
||||
self.setPixmap(pixmap)
|
||||
|
||||
|
||||
class BubbleMessage(QWidget):
|
||||
def __init__(self, text, avatar, isSend=False, parent=None):
|
||||
super().__init__(parent)
|
||||
self.isSend = isSend
|
||||
|
||||
self.txt = text
|
||||
layout = QHBoxLayout()
|
||||
self.avatar = QLabel()
|
||||
self.avatar.setPixmap(avatar)
|
||||
self.message = Label(text=text, filp=isSend)
|
||||
if isSend:
|
||||
layout.addWidget(self.message)
|
||||
layout.addWidget(self.avatar, 0, Qt.AlignTop)
|
||||
layout.setStretch(0, 1)
|
||||
else:
|
||||
layout.addWidget(self.avatar, 0, Qt.AlignTop)
|
||||
layout.addWidget(self.message)
|
||||
layout.setStretch(1, 1)
|
||||
self.setLayout(layout)
|
||||
|
||||
def resizeEvent(self, a0) -> None:
|
||||
w = (self.message.width() - 60) // 27
|
||||
row = int(len(self.txt) // w) + 1
|
||||
print('row', row)
|
||||
self.message.setMaximumHeight(row * 31 + 80)
|
||||
return
|
||||
|
||||
|
||||
class MainWindow(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
txt = '''在工具中单击边缘可以添加黑点,单击可以删掉黑点,拖动可以调整黑点长度。勾选等选项可以查看内容、缩放等区域右侧可预览不同拉伸情况下的效果,拖动可以调整预览的拉伸比例'''
|
||||
avatar = QPixmap('Data/head.jpg').scaled(60, 60)
|
||||
bubble_mesage = BubbleMessage(txt, avatar, isSend=False)
|
||||
layout = QVBoxLayout()
|
||||
bubble_mesage1 = BubbleMessage(txt, avatar, isSend=True)
|
||||
layout.addWidget(bubble_mesage)
|
||||
layout.addWidget(bubble_mesage1)
|
||||
# layout.setStretch(0, 1)
|
||||
self.setLayout(layout)
|
57
app/components/contact_info_ui.py
Normal file
57
app/components/contact_info_ui.py
Normal file
@ -0,0 +1,57 @@
|
||||
import sys
|
||||
|
||||
from PyQt5.Qt import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from .CAvatar import CAvatar
|
||||
|
||||
|
||||
# 自定义的item 继承自QListWidgetItem
|
||||
class ContactQListWidgetItem(QListWidgetItem):
|
||||
def __init__(self, name, url, img_bytes=None):
|
||||
super().__init__()
|
||||
# 自定义item中的widget 用来显示自定义的内容
|
||||
self.widget = QWidget()
|
||||
# 用来显示name
|
||||
self.nameLabel = QLabel()
|
||||
self.nameLabel.setText(name)
|
||||
# 用来显示avator(图像)
|
||||
self.avatorLabel = CAvatar(None, shape=CAvatar.Rectangle, size=QSize(60, 60),
|
||||
url=url, img_bytes=img_bytes)
|
||||
# 设置布局用来对nameLabel和avatorLabel进行布局
|
||||
self.hbox = QHBoxLayout()
|
||||
self.hbox.addWidget(self.avatorLabel)
|
||||
self.hbox.addWidget(self.nameLabel)
|
||||
self.hbox.addStretch(1)
|
||||
# 设置widget的布局
|
||||
self.widget.setLayout(self.hbox)
|
||||
# 设置自定义的QListWidgetItem的sizeHint,不然无法显示
|
||||
self.setSizeHint(self.widget.sizeHint())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
# 主窗口
|
||||
w = QWidget()
|
||||
w.setWindowTitle("QListWindow")
|
||||
# 新建QListWidget
|
||||
listWidget = QListWidget(w)
|
||||
listWidget.resize(300, 300)
|
||||
|
||||
# 新建两个自定义的QListWidgetItem(customQListWidgetItem)
|
||||
item1 = ContactQListWidgetItem("鲤鱼王", "liyuwang.jpg")
|
||||
item2 = ContactQListWidgetItem("可达鸭", "kedaya.jpg")
|
||||
|
||||
# 在listWidget中加入两个自定义的item
|
||||
listWidget.addItem(item1)
|
||||
listWidget.setItemWidget(item1, item1.widget)
|
||||
listWidget.addItem(item2)
|
||||
listWidget.setItemWidget(item2, item2.widget)
|
||||
|
||||
# 绑定点击槽函数 点击显示对应item中的name
|
||||
listWidget.itemClicked.connect(lambda item: print(item.nameLabel.text()))
|
||||
|
||||
w.show()
|
||||
sys.exit(app.exec_())
|
1
app/data/icons/search.svg
Normal file
1
app/data/icons/search.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1700143141609" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4021" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M955.069071 864.311021 740.015134 649.258107c-3.752464-3.751441-8.841366-5.860475-14.149255-5.860475-5.306866 0-10.395768 2.108011-14.149255 5.860475l-16.692171 16.692171-38.34226-38.34226c53.03796-59.810201 85.298711-138.442072 85.298711-224.478588 0-186.774871-151.952784-338.727655-338.727655-338.727655S64.527642 216.35456 64.527642 403.12943c0 186.775894 151.952784 338.728678 338.727655 338.728678 86.36909 0 165.276231-32.510438 225.170343-85.913718l38.303374 38.303374-17.34504 17.34504c-7.812943 7.813966-7.812943 20.48352 0 28.297486l215.051891 215.052914c3.753487 3.751441 8.841366 5.860475 14.149255 5.860475 5.306866 0 10.395768-2.108011 14.149255-5.860475l62.334697-62.334697C962.883037 884.794541 962.883037 872.124987 955.069071 864.311021zM104.546078 403.12943c0-164.709319 133.9999-298.709219 298.709219-298.709219s298.709219 133.9999 298.709219 298.709219S567.964616 701.839673 403.255297 701.839673 104.546078 567.838749 104.546078 403.12943zM878.585119 912.496463 691.829691 725.741036l34.036187-34.036187 186.755428 186.755428L878.585119 912.496463z" fill="#272636" p-id="4022"></path></svg>
|
After Width: | Height: | Size: 1.4 KiB |
@ -1,8 +1,11 @@
|
||||
import os.path
|
||||
from typing import Dict
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QPixmap
|
||||
|
||||
from app.DataBase import data
|
||||
from app.Ui.Icon import Icon
|
||||
|
||||
|
||||
# from app.Ui.Icon import Icon
|
||||
@ -32,6 +35,30 @@ class Me(Person):
|
||||
class Contact(Person):
|
||||
def __init__(self, wxid: str):
|
||||
super(Contact, self).__init__(wxid)
|
||||
self.smallHeadImgUrl = ''
|
||||
self.bigHeadImgUrl = ''
|
||||
|
||||
|
||||
class ContactPC:
|
||||
def __init__(self, contact_info: Dict):
|
||||
self.wxid = contact_info.get('UserName')
|
||||
self.remark = contact_info.get('Remark')
|
||||
# Alias,Type,Remark,NickName,PYInitial,RemarkPYInitial,ContactHeadImgUrl.smallHeadImgUrl,ContactHeadImgUrl,bigHeadImgUrl
|
||||
self.alias = contact_info.get('Alias')
|
||||
self.nickName = contact_info.get('NickName')
|
||||
self.smallHeadImgUrl = contact_info.get('smallHeadImgUrl')
|
||||
self.smallHeadImgBLOG = b''
|
||||
self.avatar = QPixmap()
|
||||
|
||||
def set_avatar(self, img_bytes):
|
||||
if not img_bytes:
|
||||
self.avatar.load(Icon.Default_avatar_path)
|
||||
return
|
||||
if img_bytes[:4] == b'\x89PNG':
|
||||
self.avatar.loadFromData(img_bytes, format='PNG')
|
||||
else:
|
||||
self.avatar.loadFromData(img_bytes, format='jfif')
|
||||
self.avatar.scaled(60, 60, Qt.IgnoreAspectRatio, Qt.SmoothTransformation)
|
||||
|
||||
|
||||
class Group(Person):
|
||||
|
19
app/ui_pc/Icon.py
Normal file
19
app/ui_pc/Icon.py
Normal file
@ -0,0 +1,19 @@
|
||||
from PyQt5.QtGui import QIcon
|
||||
|
||||
|
||||
class Icon:
|
||||
Default_avatar_path = './app/data/icons/default_avatar.svg'
|
||||
MainWindow_Icon = QIcon('./app/data/icons/logo.svg')
|
||||
Default_avatar = QIcon(Default_avatar_path)
|
||||
Output = QIcon('./app/data/icons/output.svg')
|
||||
Back = QIcon('./app/data/icons/back.svg')
|
||||
ToDocx = QIcon('app/data/icons/word.svg')
|
||||
ToCSV = QIcon('app/data/icons/csv.svg')
|
||||
ToHTML = QIcon('app/data/icons/html.svg')
|
||||
Chat_Icon = QIcon('./app/data/icons/chat.svg')
|
||||
Contact_Icon = QIcon('./app/data/icons/contact.svg')
|
||||
MyInfo_Icon = QIcon('./app/data/icons/myinfo.svg')
|
||||
Annual_Report_Icon = QIcon('./app/data/icons/annual_report.svg')
|
||||
Analysis_Icon = QIcon('./app/data/icons/analysis.svg')
|
||||
Emotion_Icon = QIcon('./app/data/icons/emotion.svg')
|
||||
Search_Icon = QIcon('./app/data/icons/search.svg')
|
3
app/ui_pc/__init__.py
Normal file
3
app/ui_pc/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from . import mainview
|
||||
|
||||
__all__ = ['mainview']
|
1
app/ui_pc/contact/__init__.py
Normal file
1
app/ui_pc/contact/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .contact_window import ContactWindow
|
143
app/ui_pc/contact/contactInfo.py
Normal file
143
app/ui_pc/contact/contactInfo.py
Normal file
@ -0,0 +1,143 @@
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from app import person
|
||||
from app.DataBase.output_pc import Output
|
||||
from app.Ui.Icon import Icon
|
||||
from .contactInfoUi import Ui_Form
|
||||
from .userinfo import userinfo
|
||||
|
||||
|
||||
class ContactInfo(QWidget, Ui_Form):
|
||||
exitSignal = pyqtSignal()
|
||||
urlSignal = pyqtSignal(QUrl)
|
||||
|
||||
# username = ''
|
||||
def __init__(self, contact, me: person.Me = None, parent=None):
|
||||
super(ContactInfo, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.contact = contact
|
||||
self.view_userinfo = userinfo.UserinfoController(self.contact)
|
||||
|
||||
# self.btn_analysis.clicked.connect(self.analysis)
|
||||
# self.btn_emotion.clicked.connect(self.emotionale_Analysis)
|
||||
# self.btn_report.clicked.connect(self.annual_report)
|
||||
self.btn_back.clicked.connect(self.back)
|
||||
self.Me = me
|
||||
# self.
|
||||
self.init_ui()
|
||||
|
||||
def init_ui(self):
|
||||
self.btn_back.setIcon(Icon.Back)
|
||||
self.btn_report.setIcon(Icon.Annual_Report_Icon)
|
||||
self.btn_analysis.setIcon(Icon.Analysis_Icon)
|
||||
self.btn_emotion.setIcon(Icon.Emotion_Icon)
|
||||
self.label_remark.setText(self.contact.remark)
|
||||
self.stackedWidget.addWidget(self.view_userinfo)
|
||||
self.stackedWidget.setCurrentWidget(self.view_userinfo)
|
||||
menu = QMenu(self)
|
||||
self.toDocxAct = QAction(Icon.ToDocx, '导出Docx', self)
|
||||
self.toCSVAct = QAction(Icon.ToCSV, '导出CSV', self)
|
||||
self.toHtmlAct = QAction(Icon.ToHTML, '导出HTML', self)
|
||||
self.toolButton_output.setPopupMode(QToolButton.MenuButtonPopup)
|
||||
self.toolButton_output.clicked.connect(self.toolButton_show)
|
||||
menu.addAction(self.toDocxAct)
|
||||
menu.addAction(self.toCSVAct)
|
||||
menu.addAction(self.toHtmlAct)
|
||||
self.toolButton_output.setMenu(menu)
|
||||
self.toolButton_output.setIcon(Icon.Output)
|
||||
# self.toolButton_output.addSeparator()
|
||||
self.toHtmlAct.triggered.connect(self.output)
|
||||
self.toDocxAct.triggered.connect(self.output)
|
||||
self.toCSVAct.triggered.connect(self.output)
|
||||
|
||||
def toolButton_show(self):
|
||||
self.toolButton_output.showMenu()
|
||||
|
||||
def analysis(self):
|
||||
self.stackedWidget.setCurrentWidget(self.view_analysis)
|
||||
if 'room' in self.contact.wxid:
|
||||
QMessageBox.warning(
|
||||
self, '警告',
|
||||
'暂不支持群组'
|
||||
)
|
||||
return
|
||||
self.view_analysis.start()
|
||||
|
||||
def annual_report(self):
|
||||
QMessageBox.warning(
|
||||
self,
|
||||
"提示",
|
||||
"敬请期待"
|
||||
)
|
||||
return
|
||||
# self.report = report.ReportController(self.contact)
|
||||
# self.report.show()
|
||||
|
||||
def emotionale_Analysis(self):
|
||||
self.stackedWidget.setCurrentWidget(self.view_emotion)
|
||||
if 'room' in self.contact.wxid:
|
||||
QMessageBox.warning(
|
||||
self, '警告',
|
||||
'暂不支持群组'
|
||||
)
|
||||
return
|
||||
self.view_emotion.start()
|
||||
|
||||
def back(self):
|
||||
"""
|
||||
将userinfo界面设置为可见,其他界面设置为不可见
|
||||
"""
|
||||
self.stackedWidget.setCurrentWidget(self.view_userinfo)
|
||||
|
||||
def output(self):
|
||||
"""
|
||||
导出聊天记录
|
||||
:return:
|
||||
"""
|
||||
self.stackedWidget.setCurrentWidget(self.view_userinfo)
|
||||
if self.sender() == self.toDocxAct:
|
||||
print('功能暂未实现')
|
||||
QMessageBox.warning(self,
|
||||
"别急别急",
|
||||
"马上就实现该功能"
|
||||
)
|
||||
return
|
||||
self.outputThread = Output(self.Me, self.contact.wxid)
|
||||
elif self.sender() == self.toCSVAct:
|
||||
# QMessageBox.warning(self,
|
||||
# "别急别急",
|
||||
# "马上就实现该功能"
|
||||
# )
|
||||
# print('开始导出csv')
|
||||
# return
|
||||
self.outputThread = Output(self.contact, type_=Output.CSV)
|
||||
print('导出csv')
|
||||
elif self.sender() == self.toHtmlAct:
|
||||
print('功能暂未实现')
|
||||
QMessageBox.warning(self,
|
||||
"别急别急",
|
||||
"马上就实现该功能"
|
||||
)
|
||||
return
|
||||
self.outputThread.progressSignal.connect(self.output_progress)
|
||||
self.outputThread.rangeSignal.connect(self.set_progressBar_range)
|
||||
self.outputThread.okSignal.connect(self.hide_progress_bar)
|
||||
self.outputThread.start()
|
||||
|
||||
def hide_progress_bar(self, int):
|
||||
reply = QMessageBox(self)
|
||||
reply.setIcon(QMessageBox.Information)
|
||||
reply.setWindowTitle('OK')
|
||||
reply.setText(f"导出聊天记录成功\n在.\\data\\目录下")
|
||||
reply.addButton("确认", QMessageBox.AcceptRole)
|
||||
reply.addButton("取消", QMessageBox.RejectRole)
|
||||
api = reply.exec_()
|
||||
self.view_userinfo.progressBar.setVisible(False)
|
||||
|
||||
def output_progress(self, value):
|
||||
self.view_userinfo.progressBar.setProperty('value', value)
|
||||
|
||||
def set_progressBar_range(self, value):
|
||||
self.view_userinfo.progressBar.setVisible(True)
|
||||
self.view_userinfo.progressBar.setRange(0, value)
|
92
app/ui_pc/contact/contactInfoUi.py
Normal file
92
app/ui_pc/contact/contactInfoUi.py
Normal file
@ -0,0 +1,92 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'contactInfoUi.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# 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_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(817, 748)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
|
||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout.setSpacing(0)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.frame = QtWidgets.QFrame(Form)
|
||||
self.frame.setFrameShape(QtWidgets.QFrame.NoFrame)
|
||||
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||
self.frame.setObjectName("frame")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.frame)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_3.setSpacing(0)
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.label_remark = QtWidgets.QLabel(self.frame)
|
||||
self.label_remark.setMaximumSize(QtCore.QSize(16777215, 100))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.label_remark.setFont(font)
|
||||
self.label_remark.setText("")
|
||||
self.label_remark.setObjectName("label_remark")
|
||||
self.horizontalLayout_3.addWidget(self.label_remark)
|
||||
self.btn_analysis = QtWidgets.QPushButton(self.frame)
|
||||
self.btn_analysis.setStyleSheet("")
|
||||
self.btn_analysis.setFlat(True)
|
||||
self.btn_analysis.setObjectName("btn_analysis")
|
||||
self.horizontalLayout_3.addWidget(self.btn_analysis)
|
||||
self.btn_emotion = QtWidgets.QPushButton(self.frame)
|
||||
self.btn_emotion.setFlat(True)
|
||||
self.btn_emotion.setObjectName("btn_emotion")
|
||||
self.horizontalLayout_3.addWidget(self.btn_emotion)
|
||||
self.btn_report = QtWidgets.QPushButton(self.frame)
|
||||
self.btn_report.setFlat(True)
|
||||
self.btn_report.setObjectName("btn_report")
|
||||
self.horizontalLayout_3.addWidget(self.btn_report)
|
||||
self.btn_back = QtWidgets.QPushButton(self.frame)
|
||||
self.btn_back.setFlat(True)
|
||||
self.btn_back.setObjectName("btn_back")
|
||||
self.horizontalLayout_3.addWidget(self.btn_back)
|
||||
self.toolButton_output = QtWidgets.QToolButton(self.frame)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap("../../data/icons/output.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.toolButton_output.setIcon(icon)
|
||||
self.toolButton_output.setCheckable(False)
|
||||
self.toolButton_output.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
|
||||
self.toolButton_output.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
|
||||
self.toolButton_output.setAutoRaise(True)
|
||||
self.toolButton_output.setArrowType(QtCore.Qt.NoArrow)
|
||||
self.toolButton_output.setObjectName("toolButton_output")
|
||||
self.horizontalLayout_3.addWidget(self.toolButton_output)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
||||
self.stackedWidget = QtWidgets.QStackedWidget(self.frame)
|
||||
self.stackedWidget.setObjectName("stackedWidget")
|
||||
self.page_3 = QtWidgets.QWidget()
|
||||
self.page_3.setObjectName("page_3")
|
||||
self.stackedWidget.addWidget(self.page_3)
|
||||
self.page_4 = QtWidgets.QWidget()
|
||||
self.page_4.setObjectName("page_4")
|
||||
self.stackedWidget.addWidget(self.page_4)
|
||||
self.verticalLayout.addWidget(self.stackedWidget)
|
||||
self.horizontalLayout.addWidget(self.frame)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
self.stackedWidget.setCurrentIndex(1)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
self.btn_analysis.setText(_translate("Form", "统计信息"))
|
||||
self.btn_emotion.setText(_translate("Form", "情感分析"))
|
||||
self.btn_report.setText(_translate("Form", "年度报告"))
|
||||
self.btn_back.setText(_translate("Form", "退出"))
|
||||
self.toolButton_output.setText(_translate("Form", "导出聊天记录"))
|
168
app/ui_pc/contact/contactInfoUi.ui
Normal file
168
app/ui_pc/contact/contactInfoUi.ui
Normal file
@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>817</width>
|
||||
<height>748</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_remark">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_analysis">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>统计信息</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_emotion">
|
||||
<property name="text">
|
||||
<string>情感分析</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_report">
|
||||
<property name="text">
|
||||
<string>年度报告</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_back">
|
||||
<property name="text">
|
||||
<string>退出</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_output">
|
||||
<property name="text">
|
||||
<string>导出聊天记录</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>../../data/icons/output.svg</normaloff>
|
||||
../../data/icons/output.svg
|
||||
</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::MenuButtonPopup</enum>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="arrowType">
|
||||
<enum>Qt::NoArrow</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_3"/>
|
||||
<widget class="QWidget" name="page_4"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
67
app/ui_pc/contact/contactUi.py
Normal file
67
app/ui_pc/contact/contactUi.py
Normal file
@ -0,0 +1,67 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'contactUi.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# 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, QtWidgets
|
||||
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(840, 752)
|
||||
Form.setStyleSheet("background: rgb(240, 240, 240);")
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(Form)
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_2.setSpacing(0)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.label = QtWidgets.QLabel(Form)
|
||||
self.label.setText("")
|
||||
self.label.setObjectName("label")
|
||||
self.horizontalLayout.addWidget(self.label)
|
||||
self.lineEdit = QtWidgets.QLineEdit(Form)
|
||||
self.lineEdit.setMinimumSize(QtCore.QSize(200, 30))
|
||||
self.lineEdit.setMaximumSize(QtCore.QSize(200, 16777215))
|
||||
self.lineEdit.setStyleSheet("background:transparent;\n"
|
||||
"border-width:0;\n"
|
||||
"border-style:outset;\n"
|
||||
"background-color:rgb(226,226,226);")
|
||||
self.lineEdit.setCursorMoveStyle(QtCore.Qt.VisualMoveStyle)
|
||||
self.lineEdit.setObjectName("lineEdit")
|
||||
self.horizontalLayout.addWidget(self.lineEdit)
|
||||
self.label_2 = QtWidgets.QLabel(Form)
|
||||
self.label_2.setText("")
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.horizontalLayout.addWidget(self.label_2)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
self.verticalLayout_2.addLayout(self.verticalLayout)
|
||||
self.listWidget = QtWidgets.QListWidget(Form)
|
||||
self.listWidget.setMinimumSize(QtCore.QSize(250, 0))
|
||||
self.listWidget.setMaximumSize(QtCore.QSize(250, 16777215))
|
||||
self.listWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.listWidget.setObjectName("listWidget")
|
||||
self.verticalLayout_2.addWidget(self.listWidget)
|
||||
self.verticalLayout_2.setStretch(1, 1)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout_2)
|
||||
self.stackedWidget = QtWidgets.QStackedWidget(Form)
|
||||
self.stackedWidget.setObjectName("stackedWidget")
|
||||
self.horizontalLayout_2.addWidget(self.stackedWidget)
|
||||
self.horizontalLayout_2.setStretch(1, 1)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
self.stackedWidget.setCurrentIndex(-1)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
105
app/ui_pc/contact/contactUi.ui
Normal file
105
app/ui_pc/contact/contactUi.ui
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>840</width>
|
||||
<height>752</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: rgb(240, 240, 240);</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:transparent;
|
||||
border-width:0;
|
||||
border-style:outset;
|
||||
background-color:rgb(226,226,226);
|
||||
</string>
|
||||
</property>
|
||||
<property name="cursorMoveStyle">
|
||||
<enum>Qt::VisualMoveStyle</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
114
app/ui_pc/contact/contact_window.py
Normal file
114
app/ui_pc/contact/contact_window.py
Normal file
@ -0,0 +1,114 @@
|
||||
from PyQt5.QtCore import QThread, pyqtSignal
|
||||
from PyQt5.QtWidgets import QWidget, QMessageBox, QAction, QLineEdit
|
||||
|
||||
from app.DataBase import micro_msg, misc
|
||||
from app.components import ContactQListWidgetItem
|
||||
from app.person import ContactPC
|
||||
from .contactInfo import ContactInfo
|
||||
from .contactUi import Ui_Form
|
||||
from ..Icon import Icon
|
||||
|
||||
# 美化样式表
|
||||
Stylesheet = """
|
||||
|
||||
/*去掉item虚线边框*/
|
||||
QListWidget, QListView, QTreeWidget, QTreeView {
|
||||
outline: 0px;
|
||||
border:none;
|
||||
background-color:rgb(240,240,240)
|
||||
}
|
||||
/*设置左侧选项的最小最大宽度,文字颜色和背景颜色*/
|
||||
QListWidget {
|
||||
min-width: 250px;
|
||||
max-width: 250px;
|
||||
min-height: 80px;
|
||||
max-height: 1200px;
|
||||
color: black;
|
||||
border:none;
|
||||
}
|
||||
QListWidget::item{
|
||||
height:60px;
|
||||
width:250px;
|
||||
}
|
||||
/*被选中时的背景颜色和左边框颜色*/
|
||||
QListWidget::item:selected {
|
||||
background: rgb(204, 204, 204);
|
||||
border-bottom: 2px solid rgb(9, 187, 7);
|
||||
border-left:none;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
/*鼠标悬停颜色*/
|
||||
HistoryPanel::item:hover {
|
||||
background: rgb(52, 52, 52);
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
class ContactWindow(QWidget, Ui_Form):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.show_thread = None
|
||||
self.setupUi(self)
|
||||
self.ok_flag = False
|
||||
self.setStyleSheet(Stylesheet)
|
||||
self.init_ui()
|
||||
self.show_contacts()
|
||||
|
||||
def init_ui(self):
|
||||
search_action = QAction(self.lineEdit)
|
||||
search_action.setIcon(Icon.Search_Icon)
|
||||
self.lineEdit.addAction(search_action, QLineEdit.LeadingPosition)
|
||||
self.listWidget.clear()
|
||||
self.listWidget.currentRowChanged.connect(self.setCurrentIndex)
|
||||
self.listWidget.setCurrentRow(0)
|
||||
self.stackedWidget.setCurrentIndex(0)
|
||||
|
||||
def show_contacts(self):
|
||||
if self.ok_flag:
|
||||
return
|
||||
micro_msg.init_database()
|
||||
if not micro_msg.is_database_exist():
|
||||
QMessageBox.critical(self, "错误", "数据库不存在\n请先解密数据库")
|
||||
return
|
||||
self.show_thread = ShowContactThread()
|
||||
self.show_thread.showSingal.connect(self.show_contact)
|
||||
self.show_thread.start()
|
||||
self.ok_flag = True
|
||||
|
||||
def show_contact(self, contact):
|
||||
contact_item = ContactQListWidgetItem(contact.nickName, contact.smallHeadImgUrl, contact.smallHeadImgBLOG)
|
||||
self.listWidget.addItem(contact_item)
|
||||
self.listWidget.setItemWidget(contact_item, contact_item.widget)
|
||||
contact_info_window = ContactInfo(contact)
|
||||
self.stackedWidget.addWidget(contact_info_window)
|
||||
|
||||
def setCurrentIndex(self, row):
|
||||
print(row)
|
||||
self.stackedWidget.setCurrentIndex(row)
|
||||
|
||||
|
||||
class ShowContactThread(QThread):
|
||||
showSingal = pyqtSignal(ContactPC)
|
||||
|
||||
# heightSingal = pyqtSignal(int)
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def run(self) -> None:
|
||||
contact_info_lists = micro_msg.get_contact()
|
||||
for contact_info_list in contact_info_lists:
|
||||
# UserName, Alias,Type,Remark,NickName,PYInitial,RemarkPYInitial,ContactHeadImgUrl.smallHeadImgUrl,ContactHeadImgUrl,bigHeadImgUrl
|
||||
contact_info = {
|
||||
'UserName': contact_info_list[0],
|
||||
'Alias': contact_info_list[1],
|
||||
'Type': contact_info_list[2],
|
||||
'Remark': contact_info_list[3],
|
||||
'NickName': contact_info_list[4],
|
||||
'smallHeadImgUrl': contact_info_list[7]
|
||||
}
|
||||
contact = ContactPC(contact_info)
|
||||
contact.smallHeadImgBLOG = misc.get_avatar_buffer(contact.wxid)
|
||||
contact.set_avatar(contact.smallHeadImgBLOG)
|
||||
self.showSingal.emit(contact)
|
||||
# pprint(contact.__dict__)
|
9
app/ui_pc/contact/userinfo/__init__.py
Normal file
9
app/ui_pc/contact/userinfo/__init__.py
Normal file
@ -0,0 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@File : __init__.py.py
|
||||
@Author : Shuaikang Zhou
|
||||
@Time : 2022/12/24 10:34
|
||||
@IDE : Pycharm
|
||||
@Version : Python3.10
|
||||
@comment : ···
|
||||
"""
|
15
app/ui_pc/contact/userinfo/userinfo.py
Normal file
15
app/ui_pc/contact/userinfo/userinfo.py
Normal file
@ -0,0 +1,15 @@
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from .userinfoUi import Ui_Frame
|
||||
|
||||
|
||||
class UserinfoController(QWidget, Ui_Frame):
|
||||
def __init__(self, contact, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.l_remark.setText(contact.remark)
|
||||
self.l_avatar.setPixmap(contact.avatar)
|
||||
self.l_nickname.setText(f'昵称:{contact.nickName}')
|
||||
self.l_username.setText(f'微信号:{contact.alias}')
|
||||
self.lineEdit.setText(contact.remark)
|
||||
self.progressBar.setVisible(False)
|
121
app/ui_pc/contact/userinfo/userinfoUi.py
Normal file
121
app/ui_pc/contact/userinfo/userinfoUi.py
Normal file
@ -0,0 +1,121 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'userinfoUi.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# 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_Frame(object):
|
||||
def setupUi(self, Frame):
|
||||
Frame.setObjectName("Frame")
|
||||
Frame.resize(800, 720)
|
||||
Frame.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
|
||||
Frame.setMouseTracking(True)
|
||||
Frame.setTabletTracking(True)
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(Frame)
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_2.addItem(spacerItem)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem1)
|
||||
self.gridLayout = QtWidgets.QGridLayout()
|
||||
self.gridLayout.setHorizontalSpacing(6)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.l_avatar = QtWidgets.QLabel(Frame)
|
||||
self.l_avatar.setMinimumSize(QtCore.QSize(80, 80))
|
||||
self.l_avatar.setMaximumSize(QtCore.QSize(80, 80))
|
||||
self.l_avatar.setText("")
|
||||
self.l_avatar.setPixmap(QtGui.QPixmap("../../../a_img/be0fa6c0c4707fb5f7b37b660de826d3.jpg"))
|
||||
self.l_avatar.setScaledContents(True)
|
||||
self.l_avatar.setObjectName("l_avatar")
|
||||
self.gridLayout.addWidget(self.l_avatar, 0, 0, 3, 1)
|
||||
self.l_remark = QtWidgets.QLabel(Frame)
|
||||
self.l_remark.setMinimumSize(QtCore.QSize(0, 30))
|
||||
self.l_remark.setMaximumSize(QtCore.QSize(16777215, 30))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.l_remark.setFont(font)
|
||||
self.l_remark.setObjectName("l_remark")
|
||||
self.gridLayout.addWidget(self.l_remark, 0, 1, 1, 1)
|
||||
self.l_nickname = QtWidgets.QLabel(Frame)
|
||||
self.l_nickname.setMinimumSize(QtCore.QSize(0, 30))
|
||||
self.l_nickname.setMaximumSize(QtCore.QSize(16777215, 30))
|
||||
self.l_nickname.setObjectName("l_nickname")
|
||||
self.gridLayout.addWidget(self.l_nickname, 1, 1, 1, 1)
|
||||
self.l_username = QtWidgets.QLabel(Frame)
|
||||
self.l_username.setMinimumSize(QtCore.QSize(0, 20))
|
||||
self.l_username.setMaximumSize(QtCore.QSize(16777215, 20))
|
||||
self.l_username.setObjectName("l_username")
|
||||
self.gridLayout.addWidget(self.l_username, 2, 1, 1, 1)
|
||||
self.gridLayout.setRowStretch(0, 1)
|
||||
self.gridLayout.setRowStretch(1, 1)
|
||||
self.gridLayout.setRowStretch(2, 1)
|
||||
self.verticalLayout.addLayout(self.gridLayout)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem2)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.label = QtWidgets.QLabel(Frame)
|
||||
self.label.setMinimumSize(QtCore.QSize(80, 0))
|
||||
self.label.setMaximumSize(QtCore.QSize(80, 16777215))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.label.setFont(font)
|
||||
self.label.setObjectName("label")
|
||||
self.horizontalLayout.addWidget(self.label)
|
||||
self.lineEdit = QtWidgets.QLineEdit(Frame)
|
||||
self.lineEdit.setMinimumSize(QtCore.QSize(0, 25))
|
||||
self.lineEdit.setMaximumSize(QtCore.QSize(16777215, 25))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.lineEdit.setFont(font)
|
||||
self.lineEdit.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
|
||||
self.lineEdit.setAutoFillBackground(False)
|
||||
self.lineEdit.setStyleSheet("background:transparent;border-width:0;border-style:outset")
|
||||
self.lineEdit.setObjectName("lineEdit")
|
||||
self.horizontalLayout.addWidget(self.lineEdit)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem3)
|
||||
self.progressBar = QtWidgets.QProgressBar(Frame)
|
||||
self.progressBar.setProperty("value", 24)
|
||||
self.progressBar.setObjectName("progressBar")
|
||||
self.verticalLayout.addWidget(self.progressBar)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem4)
|
||||
self.verticalLayout.setStretch(0, 2)
|
||||
self.verticalLayout.setStretch(1, 3)
|
||||
self.verticalLayout.setStretch(2, 4)
|
||||
self.verticalLayout.setStretch(3, 1)
|
||||
self.verticalLayout.setStretch(4, 4)
|
||||
self.verticalLayout.setStretch(5, 1)
|
||||
self.verticalLayout.setStretch(6, 2)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_2.addItem(spacerItem5)
|
||||
self.horizontalLayout_2.setStretch(0, 1)
|
||||
self.horizontalLayout_2.setStretch(1, 2)
|
||||
self.horizontalLayout_2.setStretch(2, 1)
|
||||
self.horizontalLayout_3.addLayout(self.horizontalLayout_2)
|
||||
|
||||
self.retranslateUi(Frame)
|
||||
QtCore.QMetaObject.connectSlotsByName(Frame)
|
||||
|
||||
def retranslateUi(self, Frame):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Frame.setWindowTitle(_translate("Frame", "Frame"))
|
||||
self.l_remark.setText(_translate("Frame", "曹雨萱"))
|
||||
self.l_nickname.setText(_translate("Frame", "昵称:997"))
|
||||
self.l_username.setText(_translate("Frame", "账号:TextLabel"))
|
||||
self.label.setText(_translate("Frame", "备注名"))
|
||||
self.lineEdit.setText(_translate("Frame", "曹雨萱"))
|
280
app/ui_pc/contact/userinfo/userinfoUi.ui
Normal file
280
app/ui_pc/contact/userinfo/userinfoUi.ui
Normal file
@ -0,0 +1,280 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Frame</class>
|
||||
<widget class="QFrame" name="Frame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>720</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="tabletTracking">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,2,1">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="2,3,4,1,4,1,2">
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="1,1,1">
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="3">
|
||||
<widget class="QLabel" name="l_avatar">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>../../../a_img/be0fa6c0c4707fb5f7b37b660de826d3.jpg</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="l_remark">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>曹雨萱</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="l_nickname">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>昵称:997</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="l_username">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>账号:TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>备注名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>ArrowCursor</cursorShape>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
background:transparent;border-width:0;border-style:outset
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>曹雨萱</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
121
app/ui_pc/mainview.py
Normal file
121
app/ui_pc/mainview.py
Normal file
@ -0,0 +1,121 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@File : mainview.py
|
||||
@Author : Shuaikang Zhou
|
||||
@Time : 2022/12/13 15:07
|
||||
@IDE : Pycharm
|
||||
@Version : Python3.10
|
||||
@comment : 主窗口
|
||||
"""
|
||||
from random import randint
|
||||
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from app import config
|
||||
from app.DataBase import msg
|
||||
from app.Ui.Icon import Icon
|
||||
from . import mainwindow
|
||||
from .contact import ContactWindow
|
||||
from .tool import ToolWindow
|
||||
|
||||
# 美化样式表
|
||||
Stylesheet = """
|
||||
QPushButton {
|
||||
background-color: rgb(240,240,240);
|
||||
border:none;
|
||||
}
|
||||
QPushButton:hover{
|
||||
background-color: rgb(209,209,209);
|
||||
}
|
||||
/*去掉item虚线边框*/
|
||||
QListWidget, QListView, QTreeWidget, QTreeView {
|
||||
outline: 0px;
|
||||
}
|
||||
/*设置左侧选项的最小最大宽度,文字颜色和背景颜色*/
|
||||
QListWidget {
|
||||
min-width: 120px;
|
||||
max-width: 120px;
|
||||
color: black;
|
||||
background: white;
|
||||
border:none;
|
||||
}
|
||||
QListWidget::item{
|
||||
height:60;
|
||||
}
|
||||
/*被选中时的背景颜色和左边框颜色*/
|
||||
QListWidget::item:selected {
|
||||
background: rgb(204, 204, 204);
|
||||
border-left: 4px solid rgb(9, 187, 7);
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
/*鼠标悬停颜色*/
|
||||
HistoryPanel::item:hover {
|
||||
background: rgb(52, 52, 52);
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
class MainWinController(QMainWindow, mainwindow.Ui_MainWindow):
|
||||
exitSignal = pyqtSignal()
|
||||
|
||||
# username = ''
|
||||
def __init__(self, username, parent=None):
|
||||
super(MainWinController, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.setWindowIcon(Icon.MainWindow_Icon)
|
||||
self.setStyleSheet(Stylesheet)
|
||||
self.listWidget.clear()
|
||||
# self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget)
|
||||
self.action_desc.triggered.connect(self.about)
|
||||
self.init_ui()
|
||||
|
||||
def init_ui(self):
|
||||
self.listWidget.currentRowChanged.connect(self.setCurrentIndex)
|
||||
chat_item = QListWidgetItem(Icon.Chat_Icon, '聊天', self.listWidget)
|
||||
contact_item = QListWidgetItem(Icon.Contact_Icon, '好友', self.listWidget)
|
||||
myinfo_item = QListWidgetItem(Icon.MyInfo_Icon, '我的', self.listWidget)
|
||||
tool_item = QListWidgetItem(Icon.MyInfo_Icon, '工具', self.listWidget)
|
||||
|
||||
tool_window = ToolWindow()
|
||||
label = QLabel('我是页面', self)
|
||||
label.setAlignment(Qt.AlignCenter)
|
||||
# 设置label的背景颜色(这里随机)
|
||||
# 这里加了一个margin边距(方便区分QStackedWidget和QLabel的颜色)
|
||||
label.setStyleSheet('background: rgb(%d, %d, %d);margin: 50px;' % (
|
||||
randint(0, 255), randint(0, 255), randint(0, 255)))
|
||||
self.stackedWidget.addWidget(label)
|
||||
self.contact_window = ContactWindow()
|
||||
self.stackedWidget.addWidget(self.contact_window)
|
||||
label = QLabel('我是页面', self)
|
||||
label.setAlignment(Qt.AlignCenter)
|
||||
# 设置label的背景颜色(这里随机)
|
||||
# 这里加了一个margin边距(方便区分QStackedWidget和QLabel的颜色)
|
||||
label.setStyleSheet('background: rgb(%d, %d, %d);margin: 50px;' % (
|
||||
randint(0, 255), randint(0, 255), randint(0, 255)))
|
||||
self.stackedWidget.addWidget(label)
|
||||
self.stackedWidget.addWidget(tool_window)
|
||||
self.listWidget.setCurrentRow(3)
|
||||
self.stackedWidget.setCurrentIndex(3)
|
||||
|
||||
def setCurrentIndex(self, row):
|
||||
if row == 1:
|
||||
self.contact_window.show_contacts()
|
||||
self.stackedWidget.setCurrentIndex(row)
|
||||
|
||||
def about(self):
|
||||
"""
|
||||
关于
|
||||
"""
|
||||
QMessageBox.about(self, "关于",
|
||||
f"版本:{config.version}\n"
|
||||
f"QQ交流群:{config.contact}\n"
|
||||
"地址:https://github.com/LC044/WeChatMsg"
|
||||
)
|
||||
|
||||
def close(self) -> bool:
|
||||
del self.listWidget
|
||||
del self.stackedWidget
|
||||
msg.close()
|
||||
self.contact_window.close()
|
149
app/ui_pc/mainwindow.py
Normal file
149
app/ui_pc/mainwindow.py
Normal file
@ -0,0 +1,149 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'mainwindow.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# 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_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(1280, 779)
|
||||
MainWindow.setStyleSheet("\n"
|
||||
"/*去掉item虚线边框*/\n"
|
||||
"QListWidget, QListView, QTreeWidget, QTreeView {\n"
|
||||
" outline: 0px;\n"
|
||||
"}\n"
|
||||
"/*设置左侧选项的最小最大宽度,文字颜色和背景颜色*/\n"
|
||||
"QListWidget {\n"
|
||||
" min-width: 120px;\n"
|
||||
" max-width: 120px;\n"
|
||||
" color: black;\n"
|
||||
" background: white;\n"
|
||||
" border:none;\n"
|
||||
"}\n"
|
||||
"QListWidget::item{\n"
|
||||
" height:80;\n"
|
||||
"}\n"
|
||||
"/*被选中时的背景颜色和左边框颜色*/\n"
|
||||
"QListWidget::item:selected {\n"
|
||||
" background: rgb(204, 204, 204);\n"
|
||||
" border-left: 4px solid rgb(9, 187, 7);\n"
|
||||
"}\n"
|
||||
"/*鼠标悬停颜色*/\n"
|
||||
"HistoryPanel::item:hover {\n"
|
||||
" background: rgb(52, 52, 52);\n"
|
||||
"}")
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
|
||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout.setSpacing(0)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.frame_info = QtWidgets.QFrame(self.centralwidget)
|
||||
self.frame_info.setMinimumSize(QtCore.QSize(80, 500))
|
||||
self.frame_info.setMaximumSize(QtCore.QSize(80, 16777215))
|
||||
self.frame_info.setStyleSheet("background-color:rgb(240,240,240)")
|
||||
self.frame_info.setFrameShape(QtWidgets.QFrame.NoFrame)
|
||||
self.frame_info.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.frame_info.setObjectName("frame_info")
|
||||
self.myavatar = QtWidgets.QLabel(self.frame_info)
|
||||
self.myavatar.setGeometry(QtCore.QRect(10, 40, 60, 60))
|
||||
self.myavatar.setObjectName("myavatar")
|
||||
self.listWidget = QtWidgets.QListWidget(self.frame_info)
|
||||
self.listWidget.setGeometry(QtCore.QRect(0, 230, 120, 331))
|
||||
self.listWidget.setObjectName("listWidget")
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
self.horizontalLayout.addWidget(self.frame_info)
|
||||
self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("微软雅黑")
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.stackedWidget.setFont(font)
|
||||
self.stackedWidget.setObjectName("stackedWidget")
|
||||
self.horizontalLayout.addWidget(self.stackedWidget)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1280, 23))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menu_F = QtWidgets.QMenu(self.menubar)
|
||||
self.menu_F.setObjectName("menu_F")
|
||||
self.menu = QtWidgets.QMenu(self.menubar)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("微软雅黑")
|
||||
self.menu.setFont(font)
|
||||
self.menu.setObjectName("menu")
|
||||
self.menu_2 = QtWidgets.QMenu(self.menubar)
|
||||
self.menu_2.setObjectName("menu_2")
|
||||
self.menu_about = QtWidgets.QMenu(self.menubar)
|
||||
self.menu_about.setObjectName("menu_about")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
||||
self.statusbar.setObjectName("statusbar")
|
||||
MainWindow.setStatusBar(self.statusbar)
|
||||
self.action_3 = QtWidgets.QAction(MainWindow)
|
||||
self.action_3.setObjectName("action_3")
|
||||
self.action_4 = QtWidgets.QAction(MainWindow)
|
||||
self.action_4.setObjectName("action_4")
|
||||
self.action = QtWidgets.QAction(MainWindow)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Microsoft YaHei UI")
|
||||
self.action.setFont(font)
|
||||
self.action.setObjectName("action")
|
||||
self.action_desc = QtWidgets.QAction(MainWindow)
|
||||
self.action_desc.setObjectName("action_desc")
|
||||
self.menu_F.addSeparator()
|
||||
self.menu_F.addSeparator()
|
||||
self.menu_F.addAction(self.action_3)
|
||||
self.menu_F.addAction(self.action_4)
|
||||
self.menu_2.addAction(self.action)
|
||||
self.menu_about.addAction(self.action_desc)
|
||||
self.menubar.addAction(self.menu_F.menuAction())
|
||||
self.menubar.addAction(self.menu.menuAction())
|
||||
self.menubar.addAction(self.menu_2.menuAction())
|
||||
self.menubar.addAction(self.menu_about.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
||||
self.myavatar.setText(_translate("MainWindow", "avatar"))
|
||||
__sortingEnabled = self.listWidget.isSortingEnabled()
|
||||
self.listWidget.setSortingEnabled(False)
|
||||
item = self.listWidget.item(0)
|
||||
item.setText(_translate("MainWindow", "新建项目"))
|
||||
item = self.listWidget.item(1)
|
||||
item.setText(_translate("MainWindow", "新建项目"))
|
||||
item = self.listWidget.item(2)
|
||||
item.setText(_translate("MainWindow", "新建项目"))
|
||||
item = self.listWidget.item(3)
|
||||
item.setText(_translate("MainWindow", "新建项目"))
|
||||
item = self.listWidget.item(4)
|
||||
item.setText(_translate("MainWindow", "新建项目"))
|
||||
self.listWidget.setSortingEnabled(__sortingEnabled)
|
||||
self.menu_F.setTitle(_translate("MainWindow", "文件(F)"))
|
||||
self.menu.setTitle(_translate("MainWindow", "编辑"))
|
||||
self.menu_2.setTitle(_translate("MainWindow", "帮助"))
|
||||
self.menu_about.setTitle(_translate("MainWindow", "关于"))
|
||||
self.action_3.setText(_translate("MainWindow", "保存"))
|
||||
self.action_4.setText(_translate("MainWindow", "退出"))
|
||||
self.action.setText(_translate("MainWindow", "关于"))
|
||||
self.action_desc.setText(_translate("MainWindow", "说明"))
|
242
app/ui_pc/mainwindow.ui
Normal file
242
app/ui_pc/mainwindow.ui
Normal file
@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1280</width>
|
||||
<height>779</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
/*去掉item虚线边框*/
|
||||
QListWidget, QListView, QTreeWidget, QTreeView {
|
||||
outline: 0px;
|
||||
}
|
||||
/*设置左侧选项的最小最大宽度,文字颜色和背景颜色*/
|
||||
QListWidget {
|
||||
min-width: 120px;
|
||||
max-width: 120px;
|
||||
color: black;
|
||||
background: white;
|
||||
border:none;
|
||||
}
|
||||
QListWidget::item{
|
||||
height:80;
|
||||
}
|
||||
/*被选中时的背景颜色和左边框颜色*/
|
||||
QListWidget::item:selected {
|
||||
background: rgb(204, 204, 204);
|
||||
border-left: 4px solid rgb(9, 187, 7);
|
||||
}
|
||||
/*鼠标悬停颜色*/
|
||||
HistoryPanel::item:hover {
|
||||
background: rgb(52, 52, 52);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_info">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgb(240,240,240)</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="myavatar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>avatar</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>230</y>
|
||||
<width>80</width>
|
||||
<height>331</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1280</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_F">
|
||||
<property name="title">
|
||||
<string>文件(F)</string>
|
||||
</property>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="action_3"/>
|
||||
<addaction name="action_4"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>编辑</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_2">
|
||||
<property name="title">
|
||||
<string>帮助</string>
|
||||
</property>
|
||||
<addaction name="action"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_about">
|
||||
<property name="title">
|
||||
<string>关于</string>
|
||||
</property>
|
||||
<addaction name="action_desc"/>
|
||||
</widget>
|
||||
<addaction name="menu_F"/>
|
||||
<addaction name="menu"/>
|
||||
<addaction name="menu_2"/>
|
||||
<addaction name="menu_about"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="action_3">
|
||||
<property name="text">
|
||||
<string>保存</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_4">
|
||||
<property name="text">
|
||||
<string>退出</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action">
|
||||
<property name="text">
|
||||
<string>关于</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Microsoft YaHei UI</family>
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_desc">
|
||||
<property name="text">
|
||||
<string>说明</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
3
app/ui_pc/tool/__init__.py
Normal file
3
app/ui_pc/tool/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from .tool_window import ToolWindow
|
||||
|
||||
__all__ = ['ToolWindow']
|
3
app/ui_pc/tool/pc_decrypt/__init__.py
Normal file
3
app/ui_pc/tool/pc_decrypt/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from .pc_decrypt import DecryptControl
|
||||
|
||||
__all__ = ['DecryptControl']
|
164
app/ui_pc/tool/pc_decrypt/decryptUi.py
Normal file
164
app/ui_pc/tool/pc_decrypt/decryptUi.py
Normal file
@ -0,0 +1,164 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'decryptUi.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# 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_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(611, 519)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("微软雅黑")
|
||||
Dialog.setFont(font)
|
||||
Dialog.setLayoutDirection(QtCore.Qt.LeftToRight)
|
||||
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(Dialog)
|
||||
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout_2.addItem(spacerItem)
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_3.addItem(spacerItem1)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.label_3 = QtWidgets.QLabel(Dialog)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("一纸情书")
|
||||
font.setPointSize(20)
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.verticalLayout.addWidget(self.label_3)
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.gridLayout = QtWidgets.QGridLayout()
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label_phone = QtWidgets.QLabel(Dialog)
|
||||
self.label_phone.setText("")
|
||||
self.label_phone.setObjectName("label_phone")
|
||||
self.gridLayout.addWidget(self.label_phone, 2, 1, 1, 1)
|
||||
self.label_7 = QtWidgets.QLabel(Dialog)
|
||||
self.label_7.setObjectName("label_7")
|
||||
self.gridLayout.addWidget(self.label_7, 1, 0, 1, 1)
|
||||
self.lineEdit = QtWidgets.QLineEdit(Dialog)
|
||||
self.lineEdit.setStyleSheet("background:transparent;border-width:0;border-style:outset")
|
||||
self.lineEdit.setFrame(False)
|
||||
self.lineEdit.setObjectName("lineEdit")
|
||||
self.gridLayout.addWidget(self.lineEdit, 4, 1, 1, 1)
|
||||
self.label_5 = QtWidgets.QLabel(Dialog)
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.gridLayout.addWidget(self.label_5, 3, 0, 1, 1)
|
||||
self.label_6 = QtWidgets.QLabel(Dialog)
|
||||
self.label_6.setObjectName("label_6")
|
||||
self.gridLayout.addWidget(self.label_6, 5, 0, 1, 1)
|
||||
self.label_key = QtWidgets.QLabel(Dialog)
|
||||
self.label_key.setText("")
|
||||
self.label_key.setObjectName("label_key")
|
||||
self.gridLayout.addWidget(self.label_key, 5, 1, 1, 1)
|
||||
self.label = QtWidgets.QLabel(Dialog)
|
||||
self.label.setObjectName("label")
|
||||
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
|
||||
self.label_2 = QtWidgets.QLabel(Dialog)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||
self.label_pid = QtWidgets.QLabel(Dialog)
|
||||
self.label_pid.setText("")
|
||||
self.label_pid.setObjectName("label_pid")
|
||||
self.gridLayout.addWidget(self.label_pid, 0, 1, 1, 1)
|
||||
self.label_name = QtWidgets.QLabel(Dialog)
|
||||
self.label_name.setText("")
|
||||
self.label_name.setObjectName("label_name")
|
||||
self.gridLayout.addWidget(self.label_name, 3, 1, 1, 1)
|
||||
self.label_4 = QtWidgets.QLabel(Dialog)
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
|
||||
self.label_version = QtWidgets.QLabel(Dialog)
|
||||
self.label_version.setText("")
|
||||
self.label_version.setObjectName("label_version")
|
||||
self.gridLayout.addWidget(self.label_version, 1, 1, 1, 1)
|
||||
self.label_8 = QtWidgets.QLabel(Dialog)
|
||||
self.label_8.setObjectName("label_8")
|
||||
self.gridLayout.addWidget(self.label_8, 6, 0, 1, 1)
|
||||
self.label_db_dir = QtWidgets.QLabel(Dialog)
|
||||
self.label_db_dir.setText("")
|
||||
self.label_db_dir.setObjectName("label_db_dir")
|
||||
self.gridLayout.addWidget(self.label_db_dir, 6, 1, 1, 1)
|
||||
self.gridLayout.setColumnMinimumWidth(0, 1)
|
||||
self.gridLayout.setColumnStretch(0, 1)
|
||||
self.gridLayout.setColumnStretch(1, 10)
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 2, 1)
|
||||
self.btn_getinfo = QtWidgets.QPushButton(Dialog)
|
||||
self.btn_getinfo.setMinimumSize(QtCore.QSize(0, 60))
|
||||
self.btn_getinfo.setObjectName("btn_getinfo")
|
||||
self.gridLayout_2.addWidget(self.btn_getinfo, 0, 1, 1, 1)
|
||||
self.checkBox = QtWidgets.QCheckBox(Dialog)
|
||||
self.checkBox.setText("")
|
||||
self.checkBox.setObjectName("checkBox")
|
||||
self.gridLayout_2.addWidget(self.checkBox, 0, 2, 1, 1)
|
||||
self.btn_db_dir = QtWidgets.QPushButton(Dialog)
|
||||
self.btn_db_dir.setMinimumSize(QtCore.QSize(0, 60))
|
||||
self.btn_db_dir.setObjectName("btn_db_dir")
|
||||
self.gridLayout_2.addWidget(self.btn_db_dir, 1, 1, 1, 1)
|
||||
self.checkBox_2 = QtWidgets.QCheckBox(Dialog)
|
||||
self.checkBox_2.setText("")
|
||||
self.checkBox_2.setObjectName("checkBox_2")
|
||||
self.gridLayout_2.addWidget(self.checkBox_2, 1, 2, 1, 1)
|
||||
self.verticalLayout.addLayout(self.gridLayout_2)
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_2.addItem(spacerItem2)
|
||||
self.pushButton_3 = QtWidgets.QPushButton(Dialog)
|
||||
self.pushButton_3.setMinimumSize(QtCore.QSize(0, 60))
|
||||
self.pushButton_3.setMaximumSize(QtCore.QSize(100, 16777215))
|
||||
self.pushButton_3.setObjectName("pushButton_3")
|
||||
self.horizontalLayout_2.addWidget(self.pushButton_3)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_2.addItem(spacerItem3)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_2)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.label_ready = QtWidgets.QLabel(Dialog)
|
||||
self.label_ready.setObjectName("label_ready")
|
||||
self.horizontalLayout.addWidget(self.label_ready)
|
||||
self.progressBar = QtWidgets.QProgressBar(Dialog)
|
||||
self.progressBar.setProperty("value", 50)
|
||||
self.progressBar.setObjectName("progressBar")
|
||||
self.horizontalLayout.addWidget(self.progressBar)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
self.horizontalLayout_3.addLayout(self.verticalLayout)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_3.addItem(spacerItem4)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout_2.addItem(spacerItem5)
|
||||
self.horizontalLayout_4.addLayout(self.verticalLayout_2)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.label_3.setText(_translate("Dialog", "解密数据库"))
|
||||
self.label_7.setText(_translate("Dialog", "版本"))
|
||||
self.label_5.setText(_translate("Dialog", "微信昵称"))
|
||||
self.label_6.setText(_translate("Dialog", "密钥"))
|
||||
self.label.setText(_translate("Dialog", "PID"))
|
||||
self.label_2.setText(_translate("Dialog", "手机号"))
|
||||
self.label_4.setText(_translate("Dialog", "wxid"))
|
||||
self.label_8.setText(_translate("Dialog", "微信路径"))
|
||||
self.btn_getinfo.setText(_translate("Dialog", "获取信息"))
|
||||
self.btn_db_dir.setText(_translate("Dialog", "设置微信路径"))
|
||||
self.pushButton_3.setText(_translate("Dialog", "开始解密"))
|
||||
self.label_ready.setText(_translate("Dialog", "未就绪"))
|
328
app/ui_pc/tool/pc_decrypt/decryptUi.ui
Normal file
328
app/ui_pc/tool/pc_decrypt/decryptUi.ui
Normal file
@ -0,0 +1,328 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>611</width>
|
||||
<height>519</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>一纸情书</family>
|
||||
<pointsize>20</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>解密数据库</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0"
|
||||
columnstretch="1,10" columnminimumwidth="1,0">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_phone">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>版本</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
background:transparent;border-width:0;border-style:outset
|
||||
</string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>微信昵称</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>密钥</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_key">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>PID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>手机号</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_pid">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_name">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>wxid</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_version">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>微信路径</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_db_dir">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="btn_getinfo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>获取信息</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="btn_db_dir">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>设置微信路径</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>开始解密</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_ready">
|
||||
<property name="text">
|
||||
<string>未就绪</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -88,7 +88,7 @@ class DecryptControl(QWidget, decryptUi.Ui_Dialog):
|
||||
# 中间可以添加处理逻辑
|
||||
# QMessageBox.about(self, "解密成功", "数据库文件存储在app/DataBase/Msg文件夹下")
|
||||
self.DecryptSignal.emit('ok')
|
||||
self.close()
|
||||
# self.close()
|
||||
|
||||
def setProgressBarMaxNum(self, max_val):
|
||||
self.progressBar.setRange(0, max_val)
|
83
app/ui_pc/tool/toolUI.py
Normal file
83
app/ui_pc/tool/toolUI.py
Normal file
@ -0,0 +1,83 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'toolUI.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# 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_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(630, 633)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("微软雅黑")
|
||||
Dialog.setFont(font)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
|
||||
self.horizontalLayout.setSpacing(0)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.label = QtWidgets.QLabel(Dialog)
|
||||
self.label.setMaximumSize(QtCore.QSize(80, 80))
|
||||
self.label.setObjectName("label")
|
||||
self.horizontalLayout.addWidget(self.label)
|
||||
self.listWidget = QtWidgets.QListWidget(Dialog)
|
||||
self.listWidget.setMinimumSize(QtCore.QSize(500, 80))
|
||||
self.listWidget.setMaximumSize(QtCore.QSize(500, 80))
|
||||
self.listWidget.setFrameShape(QtWidgets.QFrame.NoFrame)
|
||||
self.listWidget.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.listWidget.setLineWidth(0)
|
||||
self.listWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.listWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.listWidget.setFlow(QtWidgets.QListView.LeftToRight)
|
||||
self.listWidget.setObjectName("listWidget")
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
item = QtWidgets.QListWidgetItem()
|
||||
self.listWidget.addItem(item)
|
||||
self.horizontalLayout.addWidget(self.listWidget)
|
||||
self.label_2 = QtWidgets.QLabel(Dialog)
|
||||
self.label_2.setMaximumSize(QtCore.QSize(80, 80))
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.horizontalLayout.addWidget(self.label_2)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
self.stackedWidget = QtWidgets.QStackedWidget(Dialog)
|
||||
self.stackedWidget.setObjectName("stackedWidget")
|
||||
self.verticalLayout.addWidget(self.stackedWidget)
|
||||
self.verticalLayout.setStretch(1, 1)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.stackedWidget.setCurrentIndex(-1)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.label.setText(_translate("Dialog", "TextLabel"))
|
||||
__sortingEnabled = self.listWidget.isSortingEnabled()
|
||||
self.listWidget.setSortingEnabled(False)
|
||||
item = self.listWidget.item(0)
|
||||
item.setText(_translate("Dialog", "新建项目"))
|
||||
item = self.listWidget.item(1)
|
||||
item.setText(_translate("Dialog", "新建项目"))
|
||||
item = self.listWidget.item(2)
|
||||
item.setText(_translate("Dialog", "新建项目"))
|
||||
item = self.listWidget.item(3)
|
||||
item.setText(_translate("Dialog", "新建项目"))
|
||||
item = self.listWidget.item(4)
|
||||
item.setText(_translate("Dialog", "新建项目"))
|
||||
self.listWidget.setSortingEnabled(__sortingEnabled)
|
||||
self.label_2.setText(_translate("Dialog", "TextLabel"))
|
128
app/ui_pc/tool/toolUI.ui
Normal file
128
app/ui_pc/tool/toolUI.ui
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>630</width>
|
||||
<height>547</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="flow">
|
||||
<enum>QListView::LeftToRight</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>新建项目</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
77
app/ui_pc/tool/tool_window.py
Normal file
77
app/ui_pc/tool/tool_window.py
Normal file
@ -0,0 +1,77 @@
|
||||
from random import randint
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QWidget, QListWidgetItem, QLabel
|
||||
|
||||
from .pc_decrypt import DecryptControl
|
||||
from .toolUI import Ui_Dialog
|
||||
from ...Ui.Icon import Icon
|
||||
|
||||
# 美化样式表
|
||||
Stylesheet = """
|
||||
|
||||
/*去掉item虚线边框*/
|
||||
QListWidget, QListView, QTreeWidget, QTreeView {
|
||||
outline: 0px;
|
||||
border:none;
|
||||
background-color:rgb(240,240,240)
|
||||
}
|
||||
/*设置左侧选项的最小最大宽度,文字颜色和背景颜色*/
|
||||
QListWidget {
|
||||
min-width: 400px;
|
||||
max-width: 400px;
|
||||
min-height: 80px;
|
||||
max-height: 80px;
|
||||
color: black;
|
||||
border:none;
|
||||
}
|
||||
QListWidget::item{
|
||||
height:80px;
|
||||
width:80px;
|
||||
}
|
||||
/*被选中时的背景颜色和左边框颜色*/
|
||||
QListWidget::item:selected {
|
||||
background: rgb(204, 204, 204);
|
||||
border-bottom: 4px solid rgb(9, 187, 7);
|
||||
border-left:none;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
/*鼠标悬停颜色*/
|
||||
HistoryPanel::item:hover {
|
||||
background: rgb(52, 52, 52);
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
class ToolWindow(QWidget, Ui_Dialog):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.setStyleSheet(Stylesheet)
|
||||
self.init_ui()
|
||||
|
||||
def init_ui(self):
|
||||
self.listWidget.clear()
|
||||
self.listWidget.currentRowChanged.connect(self.setCurrentIndex)
|
||||
chat_item = QListWidgetItem(Icon.Chat_Icon, '解密', self.listWidget)
|
||||
contact_item = QListWidgetItem(Icon.Contact_Icon, 'None', self.listWidget)
|
||||
myinfo_item = QListWidgetItem(Icon.MyInfo_Icon, 'None', self.listWidget)
|
||||
tool_item = QListWidgetItem(Icon.MyInfo_Icon, 'None', self.listWidget)
|
||||
tool_window = DecryptControl()
|
||||
self.stackedWidget.addWidget(tool_window)
|
||||
label = QLabel('我是页面', self)
|
||||
label.setAlignment(Qt.AlignCenter)
|
||||
# 设置label的背景颜色(这里随机)
|
||||
# 这里加了一个margin边距(方便区分QStackedWidget和QLabel的颜色)
|
||||
label.setStyleSheet('background: rgb(%d, %d, %d);margin: 50px;' % (
|
||||
randint(0, 255), randint(0, 255), randint(0, 255)))
|
||||
self.stackedWidget.addWidget(label)
|
||||
self.stackedWidget.addWidget(label)
|
||||
self.stackedWidget.addWidget(label)
|
||||
self.listWidget.setCurrentRow(0)
|
||||
self.stackedWidget.setCurrentIndex(0)
|
||||
|
||||
def setCurrentIndex(self, row):
|
||||
print(row)
|
||||
self.stackedWidget.setCurrentIndex(row)
|
@ -1,10 +1,12 @@
|
||||
import ctypes
|
||||
import sys
|
||||
import time
|
||||
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from app.Ui import pc_decrypt
|
||||
from app.ui_pc import mainview
|
||||
from app.ui_pc.tool.pc_decrypt import pc_decrypt
|
||||
|
||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("WeChatReport")
|
||||
|
||||
@ -26,6 +28,23 @@ class ViewController(QWidget):
|
||||
self.viewDecrypt.DecryptSignal.connect(self.show_success)
|
||||
self.viewDecrypt.show()
|
||||
|
||||
def loadMainWinView(self, username=None):
|
||||
"""
|
||||
聊天界面
|
||||
:param username: 账号
|
||||
:return:
|
||||
"""
|
||||
username = ''
|
||||
start = time.time()
|
||||
self.viewMainWIn = mainview.MainWinController(username=username)
|
||||
self.viewMainWIn.setWindowTitle("Chat")
|
||||
# print(username)
|
||||
self.viewMainWIn.username = username
|
||||
# self.viewMainWIn.exitSignal.connect(self.loadDecryptView) # 不需要回到登录界面可以省略
|
||||
self.viewMainWIn.show()
|
||||
end = time.time()
|
||||
print('ok', end - start)
|
||||
|
||||
def show_success(self):
|
||||
QMessageBox.about(self, "解密成功", "数据库文件存储在\napp/DataBase/Msg\n文件夹下")
|
||||
|
||||
@ -33,6 +52,7 @@ class ViewController(QWidget):
|
||||
if __name__ == '__main__':
|
||||
app = QApplication(sys.argv)
|
||||
view = ViewController()
|
||||
view.loadPCDecryptView()
|
||||
# view.loadPCDecryptView()
|
||||
view.loadMainWinView()
|
||||
# view.show_success()
|
||||
sys.exit(app.exec_())
|
||||
|
Loading…
Reference in New Issue
Block a user