master
abc15379 1 year ago
parent 58fee164a0
commit d314218ef4

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SonarLintProjectSettings">
<option name="fileExclusions">
<list>
<option value="DIRECTORY:windows/res/ven" />
</list>
</option>
</component>
</project>

@ -0,0 +1,47 @@
u python:S1192"PDefine a constant instead of duplicating this literal '区域中心点' 6 times.(ìÚϾúÿÿÿÿ8¬¡<C2AC>¿½1
f python:S2208"GImport only needed names or import the module and then use its members.(”ä’8®¡<C2AE>¿½1
w python:S116î"XRename this field "verticalLayout_9" to match the regular expression ^[_a-z][_a-z0-9]*$.(Ÿ·ƒè8ôòŽ´½1
| python:S116"XRename this field "verticalLayout_6" to match the regular expression ^[_a-z][_a-z0-9]*$.(<28>¿ÿÿÿÿÿ8ôòŽ´½1
u python:S116Ô"VRename this field "selectedWidget" to match the regular expression ^[_a-z][_a-z0-9]*$.(¨¾‚·8õòŽ´½1
{ python:S116M"XRename this field "verticalLayout_2" to match the regular expression ^[_a-z][_a-z0-9]*$.(×±žãüÿÿÿÿ8ôòŽ´½1
v python:S116ž"RRename this field "confirmBtn" to match the regular expression ^[_a-z][_a-z0-9]*$.(<28>—¨Þüÿÿÿÿ8ôòŽ´½1
t python:S116ª"PRename this field "comboBox" to match the regular expression ^[_a-z][_a-z0-9]*$.(ËÁþìúÿÿÿÿ8õòŽ´½1
y python:S1167"VRename this field "opr_mouseClick" to match the regular expression ^[_a-z][_a-z0-9]*$.(ßüãþùÿÿÿÿ8ôòŽ´½1
} python:S116"YRename this field "verticalLayout_10" to match the regular expression ^[_a-z][_a-z0-9]*$.(¯œ—‘üÿÿÿÿ8õòŽ´½1
x python:S116Â"TRename this field "opr_keyClick" to match the regular expression ^[_a-z][_a-z0-9]*$.(ØТƒüÿÿÿÿ8ôòŽ´½1
p python:S1160"RRename this field "gridLayout" to match the regular expression ^[_a-z][_a-z0-9]*$.(°ÆÏŒ8õòŽ´½1
{ python:S116d"XRename this field "verticalLayout_3" to match the regular expression ^[_a-z][_a-z0-9]*$.(‡¥»©úÿÿÿÿ8õòŽ´½1
| python:S116×"XRename this field "verticalLayout_8" to match the regular expression ^[_a-z][_a-z0-9]*$.(µÔž¯úÿÿÿÿ8õòŽ´½1
w python:S116À"XRename this field "verticalLayout_5" to match the regular expression ^[_a-z][_a-z0-9]*$.(ã¸Ïõ8õòŽ´½1
w python:S116-"TRename this field "layoutWidget" to match the regular expression ^[_a-z][_a-z0-9]*$.(õîíÆýÿÿÿÿ8ôòŽ´½1
v python:S116O"SRename this field "opr_holdTap" to match the regular expression ^[_a-z][_a-z0-9]*$.(ݺÍÊþÿÿÿÿ8õòŽ´½1
y python:S1165"VRename this field "verticalLayout" to match the regular expression ^[_a-z][_a-z0-9]*$.(ÜãÉØùÿÿÿÿ8ôòŽ´½1
{ python:S116{"XRename this field "verticalLayout_4" to match the regular expression ^[_a-z][_a-z0-9]*$.(‹ãùóûÿÿÿÿ8õòŽ´½1
| python:S116©"XRename this field "verticalLayout_7" to match the regular expression ^[_a-z][_a-z0-9]*$.(×®‰¢üÿÿÿÿ8õòŽ´½1
f python:S5720ª"ARename "file_path" to "self" or add the missing "self" parameter.(<>ƒ…üÿÿÿÿ8´¡<C2B4>¿½1
n python:S117'"PRename this parameter "Form" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ëö‘¹8õòŽ´½1
i python:S100'"KRename method "setupUi" to match the regular expression ^[a-z_][a-z0-9_]*$.(Ëö‘¹8õòŽ´½1
t python:S117<18>"PRename this parameter "Form" to match the regular expression ^[_a-z][a-z0-9_]*$.(ý‰<C3BD>·úÿÿÿÿ8õòŽ´½1
u python:S100<18>"QRename method "retranslateUi" to match the regular expression ^[a-z_][a-z0-9_]*$.(ý‰<C3BD>·úÿÿÿÿ8õòŽ´½1
 python:S100¦"[Rename method "handleComboBoxActivated" to match the regular expression ^[a-z_][a-z0-9_]*$.(†«ÿïýÿÿÿÿ8õòŽ´½1
r python:S100Á"NRename method "getJpgPath" to match the regular expression ^[a-z_][a-z0-9_]*$.(„¤ÍÄüÿÿÿÿ8õòŽ´½1
w python:S100Ì"SRename method "findQGridLayout" to match the regular expression ^[a-z_][a-z0-9_]*$.(°ÙÕ·üÿÿÿÿ8öòŽ´½1
w python:S100Ö"SRename method "onWidgetClicked" to match the regular expression ^[a-z_][a-z0-9_]*$.(µ±¹»ûÿÿÿÿ8öòŽ´½1
y python:S3776Ö"TRefactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.(µ±¹»ûÿÿÿÿ8öòŽ´½1
ƒ python:S1871ù"cEither merge this branch with the identical one on line "495" or change one of the implementations.(âòÚ±8öòŽ´½1
ƒ python:S1871ƒ"cEither merge this branch with the identical one on line "495" or change one of the implementations.(âòÚ±8öòŽ´½1
ƒ python:S1871<18>"cEither merge this branch with the identical one on line "495" or change one of the implementations.(âòÚ±8öòŽ´½1
ƒ python:S1871¦"cEither merge this branch with the identical one on line "541" or change one of the implementations.(âòÚ±8öòŽ´½1
n python:S100º"ORename method "setOperator" to match the regular expression ^[a-z_][a-z0-9_]*$.(”ÀŠá8öòŽ´½1
n python:S100½"ORename method "getOperator" to match the regular expression ^[a-z_][a-z0-9_]*$.(ºÊ“—8÷òŽ´½1
C python:S125Ê"Remove this commented out code.(ë°ô‹ùÿÿÿÿ8¸¡<C2B8>¿½1
} python:S117÷"YRename this local variable "pOffsetX" to match the regular expression ^[_a-z][a-z0-9_]*$.(뎾äøÿÿÿÿ8÷òŽ´½1
} python:S117ø"YRename this local variable "pOffsetY" to match the regular expression ^[_a-z][a-z0-9_]*$.(¨÷<C2A8>Íøÿÿÿÿ8÷òŽ´½1
w python:S117õ"XRename this local variable "xOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(“âÙ¹8÷òŽ´½1
w python:S117ö"XRename this local variable "yOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(µ¾ÿê8÷òŽ´½1
q python:S100î"MRename method "getInputs" to match the regular expression ^[a-z_][a-z0-9_]*$.(ìüº„ùÿÿÿÿ8÷òŽ´½1
M python:S1481ò".Remove the unused local variable "table_name".(‡£ªQ8÷òŽ´½1
y python:S3776î"TRefactor this function to reduce its Cognitive Complexity from 66 to the 15 allowed.(ìüº„ùÿÿÿÿ8¹¡<C2B9>¿½1
C python:S125ð"Remove this commented out code.(úëÕ¶ÿÿÿÿÿ8º¡<C2BA>¿½1
P python:S5806ÿ"+Rename this variable; it shadows a builtin.(<28><>Žñùÿÿÿÿ8øòŽ´½1

@ -0,0 +1,6 @@
7 python:S3626'"Remove this redundant continue.(À–¬ˆ
7 python:S36260"Remove this redundant continue.(À–¬ˆ
7 python:S3626-"Remove this redundant continue.(À–¬ˆ
7 python:S3626*"Remove this redundant continue.(À–¬ˆ
6 python:S1255"Remove this commented out code.(ÕÍ©¢

@ -0,0 +1,9 @@
w python:S117*"TRename this parameter "pOffsetX" to match the regular expression ^[_a-z][a-z0-9_]*$.(¸»<C2B8>¦øÿÿÿÿ8»å©Ä½1
w python:S117*"TRename this parameter "pOffsetY" to match the regular expression ^[_a-z][a-z0-9_]*$.(¸»<C2B8>¦øÿÿÿÿ8»å©Ä½1
v python:S117*"SRename this parameter "xOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(¸»<C2B8>¦øÿÿÿÿ8¼å©Ä½1
v python:S117*"SRename this parameter "yOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(¸»<C2B8>¦øÿÿÿÿ8¼å©Ä½1
b python:S112Ã">Replace this generic exception class with a more specific one.(å—‚¢ùÿÿÿÿ8¼å©Ä½1
b python:S112ñ">Replace this generic exception class with a more specific one.(å—‚¢ùÿÿÿÿ8¼å©Ä½1
s python:S117÷"TRename this parameter "pOffsetX" to match the regular expression ^[_a-z][a-z0-9_]*$.(<28>åÐß8¼å©Ä½1
s python:S117÷"TRename this parameter "pOffsetY" to match the regular expression ^[_a-z][a-z0-9_]*$.(<28>åÐß8½å©Ä½1

@ -0,0 +1,2 @@
i python:S3457{"EAdd replacement fields or use a normal string instead of an f-string.(ˆí˜èøÿÿÿÿ8᫹Ľ1

@ -0,0 +1,6 @@
r python:S117"TRename this parameter "shotArea" to match the regular expression ^[_a-z][a-z0-9_]*$.(•úèµ8”ÆîĽ1
O python:S5806'"+Rename this variable; it shadows a builtin.(¦šÚÎùÿÿÿÿ8”ÆîĽ1
s python:S3776_"TRefactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed.(¯Œåò8•ÆîĽ1
< python:S125{"Remove this commented out code.(×Ô€8•ÆîĽ1
C python:S125"Remove this commented out code.(£ÔÛ÷ûÿÿÿÿ8•ÆîĽ1

@ -0,0 +1,3 @@
u python:S117<"YRename this local variable "shotArea" to match the regular expression ^[_a-z][a-z0-9_]*$.(õÖ¤…ùÿÿÿÿ
k python:S100*"ORename method "setShotArea" to match the regular expression ^[a-z_][a-z0-9_]*$.(û¼ÄÄüÿÿÿÿ

@ -0,0 +1,19 @@
k python:S1192+"SDefine a constant instead of duplicating this literal "æ•°æ<C2B0>®æ<C2AE>å…¥æˆ<C3A6>功" 4 times.(ˆ‡ö³
k python:S117"TRename this parameter "pOffsetX" to match the regular expression ^[_a-z][a-z0-9_]*$.(Õ¿óš
k python:S117"TRename this parameter "pOffsetY" to match the regular expression ^[_a-z][a-z0-9_]*$.(Õ¿óš
j python:S117"SRename this parameter "xOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(Õ¿óš
j python:S117"SRename this parameter "yOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(Õ¿óš
j python:S117/"TRename this parameter "pOffsetX" to match the regular expression ^[_a-z][a-z0-9_]*$.(¼ÿŠ4
j python:S117/"TRename this parameter "pOffsetY" to match the regular expression ^[_a-z][a-z0-9_]*$.(¼ÿŠ4
i python:S117/"SRename this parameter "xOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(¼ÿŠ4
i python:S117/"SRename this parameter "yOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(¼ÿŠ4
h python:S100/"RRename method "insert_pidData" to match the regular expression ^[a-z_][a-z0-9_]*$.(¼ÿŠ4
^ python:S3457"EAdd replacement fields or use a normal string instead of an f-string.(ü°õÌ
g python:S116Á"ORename this field "xOffset" to match the regular expression ^[_a-z][_a-z0-9]*$.(…º¨‰
h python:S116Ä"PRename this field "pOffsetY" to match the regular expression ^[_a-z][_a-z0-9]*$.(¦÷Öš
h python:S116Ã"PRename this field "pOffsetX" to match the regular expression ^[_a-z][_a-z0-9]*$.(”ÙéÚ
l python:S116Â"ORename this field "yOffset" to match the regular expression ^[_a-z][_a-z0-9]*$.(á…–èûÿÿÿÿ
< python:S125È"Remove this commented out code.(ÖÌɽüÿÿÿÿ
< python:S125Ú"Remove this commented out code.(¼ë®óýÿÿÿÿ
7 python:S125Þ"Remove this commented out code.(Í’îù

@ -0,0 +1,17 @@
k python:S117!"TRename this parameter "ruleList" to match the regular expression ^[_a-z][a-z0-9_]*$.(‘ƒ¯ß
{ python:S100*"_Rename method "perform_userGeneralRulename" to match the regular expression ^[a-z_][a-z0-9_]*$.(´·‡úÿÿÿÿÿ
q python:S3776*"TRefactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.(´·‡úÿÿÿÿÿ
C python:S1481˜"%Remove the unused local variable "k".(êåá•ùÿÿÿÿ
E python:S1481Þ"%Remove the unused local variable "q".(¨”›8£è¼º½1
r python:S3776z"URefactor this function to reduce its Cognitive Complexity from 469 to the 15 allowed.(„—¥†úÿÿÿÿ
ƒ python:S1871"cEither merge this branch with the identical one on line "183" or change one of the implementations.(ðš×—8õ„ú½1
ƒ python:S1871Œ"cEither merge this branch with the identical one on line "190" or change one of the implementations.(ðš×—8õ„ú½1
ˆ python:S1871"cEither merge this branch with the identical one on line "198" or change one of the implementations.(ûÞˆÇþÿÿÿÿ8õ„ú½1
 python:S1871œ"cEither merge this branch with the identical one on line "206" or change one of the implementations.(óŸ¸y8õ„ú½1
K python:S1862æ"+This branch duplicates the one on line 177.(ÉóÎá8õ„ú½1
K python:S1862ƒ"+This branch duplicates the one on line 182.(ŽÁØÃ8õ„ú½1
K python:S1862"+This branch duplicates the one on line 189.(ÏÞ­ü8õ„ú½1
P python:S1862"+This branch duplicates the one on line 197.(«Í©Äþÿÿÿÿ8õ„ú½1
P python:S1862"+This branch duplicates the one on line 205.(ß²Á·øÿÿÿÿ8õ„ú½1
7 python:S125Æ"Remove this commented out code.(ÆÔœ¦

@ -0,0 +1,4 @@
6 python:S125 "Remove this commented out code.(‹È‹í
; python:S125F"Remove this commented out code.(¦Ž¼Úøÿÿÿÿ
4 python:S2772h"Remove this unneeded "pass".(ã‘Û¾

@ -0,0 +1,28 @@
o python:S1192¤"ODefine a constant instead of duplicating this literal 'test2.sqlite3' 15 times.(·²°Å8ô‰žÄ½1
f python:S5720¾"ARename "file_path" to "self" or add the missing "self" parameter.(<>ƒ…üÿÿÿÿ8õ‰žÄ½1
= python:S125w"Remove this commented out code.(àþÞü8õ‰žÄ½1
> python:S125"Remove this commented out code.(¸Œ‡ê8õ‰žÄ½1
} python:S117Ÿ"YRename this local variable "pOffsetX" to match the regular expression ^[_a-z][a-z0-9_]*$.(ƒÖäÿÿÿÿÿÿ8õ‰žÄ½1
x python:S117 "YRename this local variable "pOffsetY" to match the regular expression ^[_a-z][a-z0-9_]*$.(Þ«³¾8õ‰žÄ½1
| python:S117<18>"XRename this local variable "xOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(<28>¨°ãøÿÿÿÿ8õ‰žÄ½1
w python:S117ž"XRename this local variable "yOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(ÿÒñÐ8õ‰žÄ½1
} python:S117í"YRename this local variable "pOffsetX" to match the regular expression ^[_a-z][a-z0-9_]*$.(뎾äøÿÿÿÿ8õ‰žÄ½1
} python:S117î"YRename this local variable "pOffsetY" to match the regular expression ^[_a-z][a-z0-9_]*$.(¨÷<C2A8>Íøÿÿÿÿ8õ‰žÄ½1
w python:S117ë"XRename this local variable "xOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(“âÙ¹8õ‰žÄ½1
w python:S117ì"XRename this local variable "yOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(µ¾ÿê8õ‰žÄ½1
e python:S3457Í"EAdd replacement fields or use a normal string instead of an f-string.(©Ô ð8õ‰žÄ½1
> python:S125ý"Remove this commented out code.(¿½Ç¦8õ‰žÄ½1
C python:S125ƒ"Remove this commented out code.(À¨‚¯ýÿÿÿÿ8õ‰žÄ½1
} python:S117ž"YRename this local variable "pOffsetX" to match the regular expression ^[_a-z][a-z0-9_]*$.(õ‰÷ƒøÿÿÿÿ8õ‰žÄ½1
} python:S117Ÿ"YRename this local variable "pOffsetY" to match the regular expression ^[_a-z][a-z0-9_]*$.(´ù‚Øÿÿÿÿÿ8õ‰žÄ½1
w python:S117œ"XRename this local variable "xOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(<28>±†˜8õ‰žÄ½1
| python:S117<18>"XRename this local variable "yOffset" to match the regular expression ^[_a-z][a-z0-9_]*$.(Ó䧢ùÿÿÿÿ8õ‰žÄ½1
K python:S5806š"+Rename this variable; it shadows a builtin.(˜æÄ×8õ‰žÄ½1
e python:S3457¿"EAdd replacement fields or use a normal string instead of an f-string.(ÂÏ’Ñ8õ‰žÄ½1
e python:S3457Ñ"EAdd replacement fields or use a normal string instead of an f-string.(ÂÏ’Ñ8õ‰žÄ½1
H python:S108")Either remove or fill this block of code.(ã‘Û¾8õ‰žÄ½1
ƒ python:S1871°"cEither merge this branch with the identical one on line "554" or change one of the implementations.(ÝÐòÇ8ö‰žÄ½1
y python:S3776"TRefactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.(‚ÿéÝýÿÿÿÿ8ö‰žÄ½1
> python:S125È"Remove this commented out code.(À䢟8ö‰žÄ½1
> python:S125Ì"Remove this commented out code.(Ñâ¬Î8ö‰žÄ½1

@ -0,0 +1,52 @@
 python:S1192"nDefine a constant instead of duplicating this literal 'res/pictures/current_clicked_construction.png' 3 times.(„½<E2809E>Æùÿÿÿÿ8Øȵ¸½1
} python:S1192"]Define a constant instead of duplicating this literal 'res/pictures/no_operator.png' 3 times.(Ó¢÷…8Øȵ¸½1
 python:S1192£"gDefine a constant instead of duplicating this literal 'res/pictures/target_working_state.png' 10 times.(°Úñª8Ùȵ¸½1
Ž python:S1192 "iDefine a constant instead of duplicating this literal 'res/pictures/unclicked_working_state.png' 6 times.(Žò¸Îúÿÿÿÿ8Ùȵ¸½1
y python:S1192("ZDefine a constant instead of duplicating this literal 'res/pictures/overview.png' 3 times.(œ‹ÊÒ8Ùȵ¸½1
z python:S1192P"\Define a constant instead of duplicating this literal 'res/pictures/agenttrust.png' 3 times.(ìç€#8Ùȵ¸½1
 python:S1192¤"dDefine a constant instead of duplicating this literal 'res/pictures/mid_working_state.png' 10 times.(¥Öí“8Ùȵ¸½1
| python:S1192¥"\Define a constant instead of duplicating this literal 'unclicked_working_state.png' 3 times.(Û­¡å8Ùȵ¸½1
 python:S1192n"aDefine a constant instead of duplicating this literal 'res/pictures/remove_operator.png' 4 times.(¡Ì¬<C38C>úÿÿÿÿ8Ùȵ¸½1
v python:S1192­"VDefine a constant instead of duplicating this literal 'mid_working_state.png' 3 times.(èž½Ô8Úȵ¸½1
{ python:S1192±"[Define a constant instead of duplicating this literal 'res/pictures/mood_down.png' 3 times.(΂¥õ8Úȵ¸½1
 python:S1192Q"`Define a constant instead of duplicating this literal 'res/pictures/order_delivery.png' 3 times.(õÁ°øÿÿÿÿ8Úȵ¸½1
 python:S1192š"`Define a constant instead of duplicating this literal 'res/pictures/clear_options.png' 10 times.(‡Ã¢´ýÿÿÿÿ8Úȵ¸½1
 python:S1192"[Define a constant instead of duplicating this literal 'res/pictures/good_mood.png' 5 times.(ÔóûÈüÿÿÿÿ8Úȵ¸½1
y python:S1192O"[Define a constant instead of duplicating this literal 'res/pictures/acquiring.png' 3 times.(Öžÿt8Úȵ¸½1
ˆ python:S1192û"cDefine a constant instead of duplicating this literal 'res/pictures/the_third_choosed.png' 4 times.(í¾Ðáøÿÿÿÿ8Úȵ¸½1
 python:S1192·"]Define a constant instead of duplicating this literal 'res/pictures/common_mood.png' 5 times.(ÙåÉäùÿÿÿÿ8Úȵ¸½1
 python:S1192Ê"aDefine a constant instead of duplicating this literal 'res/pictures/bad_common_mood.png' 4 times.(¬þ•<C3BE>ýÿÿÿÿ8Ûȵ¸½1
{ python:S1192º"\Define a constant instead of duplicating this literal 'res/pictures/confirmbtn.png' 6 times.(Žû°&8Ûȵ¸½1
x python:S1542"TRename function "backToTerminal" to match the regular expression ^[a-z_][a-z0-9_]*$.(©•÷Ãøÿÿÿÿ8Ûȵ¸½1
M python:S1481²"(Remove the unused local variable "name".(¹±Âèþÿÿÿÿ8Ûȵ¸½1
x python:S3776y"TRefactor this function to reduce its Cognitive Complexity from 58 to the 15 allowed.(㊃ýûÿÿÿÿ8Ûȵ¸½1
Å python:S1515¥Add a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(¥™¨Í8Ûȵ¸½1
Ê python:S1515«Add a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(èÁš¦þÿÿÿÿ8Ûȵ¸½1
Ì python:S1515´Add a parameter to the parent lambda function and use variable "stop_photos" as its default value; The value of "stop_photos" might change at the next loop iteration.(<28>£è­øÿÿÿÿ8Ûȵ¸½1
Ì python:S1515»Add a parameter to the parent lambda function and use variable "stop_photos" as its default value; The value of "stop_photos" might change at the next loop iteration.(<28>£è­øÿÿÿÿ8Üȵ¸½1
Ì python:S1515ÃAdd a parameter to the parent lambda function and use variable "stop_photos" as its default value; The value of "stop_photos" might change at the next loop iteration.(<28>£è­øÿÿÿÿ8Üȵ¸½1
H python:S1481¥"(Remove the unused local variable "name".(Û­¡å8Üȵ¸½1
y python:S3776ç"TRefactor this function to reduce its Cognitive Complexity from 66 to the 15 allowed.(·<>ÉÇûÿÿÿÿ8Üȵ¸½1
Å python:S1515Add a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(¥™¨Í8Üȵ¸½1
Ì python:S1515§Add a parameter to the parent lambda function and use variable "stop_photos" as its default value; The value of "stop_photos" might change at the next loop iteration.(<28>£è­øÿÿÿÿ8Üȵ¸½1
Ì python:S1515°Add a parameter to the parent lambda function and use variable "stop_photos" as its default value; The value of "stop_photos" might change at the next loop iteration.(<28>£è­øÿÿÿÿ8Üȵ¸½1
H python:S1481<18>"(Remove the unused local variable "name".(Û­¡å8Üȵ¸½1
t python:S3776Ò"TRefactor this function to reduce its Cognitive Complexity from 66 to the 15 allowed.(øŸ<C3B8>×8Ýȵ¸½1
Å python:S1515ÿAdd a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(¥™¨Í8Ýȵ¸½1
Ì python:S1515Add a parameter to the parent lambda function and use variable "stop_photos" as its default value; The value of "stop_photos" might change at the next loop iteration.(<28>£è­øÿÿÿÿ8Ýȵ¸½1
Ì python:S1515šAdd a parameter to the parent lambda function and use variable "stop_photos" as its default value; The value of "stop_photos" might change at the next loop iteration.(<28>£è­øÿÿÿÿ8Ýȵ¸½1
x python:S117¹"YRename this local variable "shotArea" to match the regular expression ^[_a-z][a-z0-9_]*$.(ÓªÒ„8Ýȵ¸½1
t python:S3776¯"TRefactor this function to reduce its Cognitive Complexity from 35 to the 15 allowed.(Á¯¯·8Ýȵ¸½1
t python:S3776¢"TRefactor this function to reduce its Cognitive Complexity from 81 to the 15 allowed.(‹áÓÓ8Ýȵ¸½1
ƒ python:S1871ë"cEither merge this branch with the identical one on line "735" or change one of the implementations.(“ÛÉÖ8Ýȵ¸½1
i python:S1854ý"IRemove this assignment to local variable 'name'; the value is never used.(øÓÛÝ8Þȵ¸½1
i python:S1854ì"IRemove this assignment to local variable 'name'; the value is never used.(Ìåàµ8Þȵ¸½1
i python:S1854á"IRemove this assignment to local variable 'name'; the value is never used.(ÊûÍ‚8Þȵ¸½1
i python:S1854Õ"IRemove this assignment to local variable 'name'; the value is never used.(èž½Ô8Þȵ¸½1
i python:S1854Í"IRemove this assignment to local variable 'name'; the value is never used.(Û­¡å8Þȵ¸½1
y python:S3776¬"TRefactor this function to reduce its Cognitive Complexity from 32 to the 15 allowed.(ˆê—ßøÿÿÿÿ8Þȵ¸½1
 python:S1186·"[Add a nested comment explaining why this function is empty, or complete the implementation.(©Ñ׆úÿÿÿÿ8Þȵ¸½1
P python:S1751ü"1Refactor this loop to do more than one iteration.(÷Ë<C3B7>f8Þȵ¸½1
V python:S1751Ð"1Refactor this loop to do more than one iteration.(°…øÛúÿÿÿÿ8ßȵ¸½1
y python:S3776»"TRefactor this function to reduce its Cognitive Complexity from 28 to the 15 allowed.(«Ž§Õüÿÿÿÿ8ßȵ¸½1

@ -0,0 +1,26 @@
w python:S1192ê"YDefine a constant instead of duplicating this literal "未找到匹é…<C3A9>çš„ä½<C3A4>ç½®" 3 times.(Šˆ<C5A0>Óüÿÿÿÿ
G python:S1656+"/Remove or correct this useless self-assignment.(àÓ®©
e python:S6729Z"MUse "np.nonzero" when only the condition parameter is provided to "np.where".(Œþÿª
G python:S1656t"/Remove or correct this useless self-assignment.(àÓ®©
H python:S1656ß"/Remove or correct this useless self-assignment.(²ñ£ì
k python:S6729à"MUse "np.nonzero" when only the condition parameter is provided to "np.where".(…ŒÄ<C592>ûÿÿÿÿ
O python:S1481"1Replace unused local variable "min_val" with "_".(ë<>§Þûÿÿÿÿ
O python:S1481"1Replace unused local variable "min_loc" with "_".(ë<>§Þûÿÿÿÿ
H python:S1656<18>"/Remove or correct this useless self-assignment.(²ñ£ì
O python:S1481Ä"1Replace unused local variable "min_loc" with "_".(ë<>§Þûÿÿÿÿ
O python:S1481Ä"1Replace unused local variable "min_val" with "_".(ë<>§Þûÿÿÿÿ
H python:S1656Í"/Remove or correct this useless self-assignment.(²ñ£ì
f python:S6729"MUse "np.nonzero" when only the condition parameter is provided to "np.where".(Œþÿª
e python:S6729¨"MUse "np.nonzero" when only the condition parameter is provided to "np.where".(“”î+
e python:S6729¹"MUse "np.nonzero" when only the condition parameter is provided to "np.where".(“”î+
< python:S125È"Remove this commented out code.(»©†Öûÿÿÿÿ
7 python:S125Ù"Remove this commented out code.(ÐÏ´Š
7 python:S125ó"Remove this commented out code.(물
r python:S3776ù"TRefactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.(úíù¿üÿÿÿÿ
r python:S3776ž"TRefactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.(Ùѧûøÿÿÿÿ
m python:S3776Ã"TRefactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.(úßÕ³
r python:S3776è"TRefactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.(ñÊà¼üÿÿÿÿ
m python:S3776<18>"TRefactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed.(žûö<C3BB>
r python:S3776­"TRefactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed.(üú£Åýÿÿÿÿ
m python:S3776Í"TRefactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.(·á’º

@ -0,0 +1,18 @@
x python:S1192="[Define a constant instead of duplicating this literal 'res/pictures/skip_word.png' 6 times.(¶ãêÜüÿÿÿÿ
t python:S1192%"\Define a constant instead of duplicating this literal 'res/pictures/in_recruit.png' 7 times.(ÅÇøÖ
v python:S1192"^Define a constant instead of duplicating this literal 'res/pictures/back_confirm.png' 3 times.(<28>ùò
w python:S1192<"_Define a constant instead of duplicating this literal 'res/pictures/hire_operator.png' 4 times.(ºÜ ±
q python:S1542 "TRename function "backToTerminal" to match the regular expression ^[a-z_][a-z0-9_]*$.(©•÷Ãøÿÿÿÿ
E python:S1481J".Remove the unused local variable "count_fail".(<28>ç-
l python:S37766"TRefactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.(ö¢àÙ
 python:S1515?"¤Add a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(<28>®ƒäùÿÿÿÿ
½ python:S1515D"¤Add a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(¥™¨Í
½ python:S1515T"¤Add a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(¥™¨Í
Ä python:S1515q"¦Add a parameter to the parent lambda function and use variable "click_photo" as its default value; The value of "click_photo" might change at the next loop iteration.(²ôªÛúÿÿÿÿ
q python:S3776|"TRefactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed.(ëóÕ¡úÿÿÿÿ
à python:S1515Add a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(<28>®ƒäùÿÿÿÿ
¾ python:S1515Add a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(¥™¨Í
à python:S1515ÌAdd a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(<28>®ƒäùÿÿÿÿ
à python:S1515ÏAdd a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(<28>®ƒäùÿÿÿÿ
¾ python:S1515ÔAdd a parameter to the parent lambda function and use variable "stop_photo" as its default value; The value of "stop_photo" might change at the next loop iteration.(¥™¨Í

@ -0,0 +1,4 @@
x python:S1542
"TRename function "backToTerminal" to match the regular expression ^[a-z_][a-z0-9_]*$.(©•÷Ãøÿÿÿÿ¸œ¾½1
x python:S3776E"TRefactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.(á<>˜Îúÿÿÿÿ¸œ¾½1

@ -0,0 +1,2 @@
; python:S125"Remove this commented out code.(ÙÏ©Äùÿÿÿÿ

@ -0,0 +1,41 @@
F
windows/main_window.py,5\2\52ad1f28b8aa7c700b52cb65eb608df167a94ce6
Q
!windows/operationSelect_window.py,0\2\02ad7eae4564d9632fe3d23d9e6d80be1f20f846
K
windows/translate_window.py,e\c\ec6c9376d4d32d60600566e9c7a8f0c076d35a37
M
windows/settingrule_window.py,a\a\aa79f40f46a92e54432ffa7cd81da8dd73b33464
N
windows/res/tools/auto_game.py,1\2\127295f786beda2565b186d8d5d5a2565367c5f8
Q
!windows/res/rules/howoperation.py,7\c\7ce3bee3c6fafd9712d97c3af3d933ff88f71e4b
]
-windows/res/rules/明日方舟公开招募.py,d\0\d04b95d82a5f74a75038f99133f2f085759da145
Q
!windows/res/tools/deal_picture.py,c\c\ccf14bb1f8ec3502af3aa6b41a34a5e9b607026d
Z
*windows/res/rules/明日方舟换基建.py,b\2\b27fd112b3e915acba85027172bb85d27c7e8f8e
Q
!windows/res/ui/setrule_window1.ui,9\c\9cc84243728f504b7e1f2f67ea4542fe32ad0b35
P
windows/res/ui/setRule_window.ui,9\7\9752de266808c97970a6d618991c5c54df4734dc
M
windows/res/ui/main_window.ui,4\9\49cab68dd9d5d3ccea263b791aa21dca982ecd3a
S
#windows/entity/priority/priority.py,2\5\25ea7338b7e1785ec4db09002dcfa8991405d1a5
]
-windows/res/rules/明日方舟日常处理.py,e\2\e2546e7437485b6934e740a785adc704f04f3b76
J
windows/selectRuleOrder.py,a\6\a64f3d569c534eb69b1329b29bacab063218bc16
X
(windows/res/ui/operationSelect_window.ui,3\d\3dedcd2a32ae74e1c18a6bd7be37aa5ea08db26d
Z
*windows/control/controltools/regPictrue.py,5\a\5a86cbad9020f564c5aad1242d2920c3cc3c46ca
V
&windows/entity/operations/operation.py,3\c\3ca63e93d75f1ab0cbf4fc07b80d2e0bf236dfc4
V
&windows/control/database/sqdatabase.py,7\2\722c726e3ef8e8d6b9d762f20b7a983b977eadde
[
+windows/control/controltools/setShotArea.py,7\0\70b7ed00111901bd538e0f738417c6516e0761d8

@ -0,0 +1,41 @@
F
windows/main_window.py,5\2\52ad1f28b8aa7c700b52cb65eb608df167a94ce6
Q
!windows/operationSelect_window.py,0\2\02ad7eae4564d9632fe3d23d9e6d80be1f20f846
K
windows/translate_window.py,e\c\ec6c9376d4d32d60600566e9c7a8f0c076d35a37
M
windows/settingrule_window.py,a\a\aa79f40f46a92e54432ffa7cd81da8dd73b33464
N
windows/res/tools/auto_game.py,1\2\127295f786beda2565b186d8d5d5a2565367c5f8
Q
!windows/res/rules/howoperation.py,7\c\7ce3bee3c6fafd9712d97c3af3d933ff88f71e4b
]
-windows/res/rules/明日方舟公开招募.py,d\0\d04b95d82a5f74a75038f99133f2f085759da145
Q
!windows/res/tools/deal_picture.py,c\c\ccf14bb1f8ec3502af3aa6b41a34a5e9b607026d
Z
*windows/res/rules/明日方舟换基建.py,b\2\b27fd112b3e915acba85027172bb85d27c7e8f8e
Q
!windows/res/ui/setrule_window1.ui,9\c\9cc84243728f504b7e1f2f67ea4542fe32ad0b35
P
windows/res/ui/setRule_window.ui,9\7\9752de266808c97970a6d618991c5c54df4734dc
M
windows/res/ui/main_window.ui,4\9\49cab68dd9d5d3ccea263b791aa21dca982ecd3a
S
#windows/entity/priority/priority.py,2\5\25ea7338b7e1785ec4db09002dcfa8991405d1a5
]
-windows/res/rules/明日方舟日常处理.py,e\2\e2546e7437485b6934e740a785adc704f04f3b76
J
windows/selectRuleOrder.py,a\6\a64f3d569c534eb69b1329b29bacab063218bc16
X
(windows/res/ui/operationSelect_window.ui,3\d\3dedcd2a32ae74e1c18a6bd7be37aa5ea08db26d
Z
*windows/control/controltools/regPictrue.py,5\a\5a86cbad9020f564c5aad1242d2920c3cc3c46ca
V
&windows/entity/operations/operation.py,3\c\3ca63e93d75f1ab0cbf4fc07b80d2e0bf236dfc4
V
&windows/control/database/sqdatabase.py,7\2\722c726e3ef8e8d6b9d762f20b7a983b977eadde
[
+windows/control/controltools/setShotArea.py,7\0\70b7ed00111901bd538e0f738417c6516e0761d8

@ -14,4 +14,7 @@
</list>
</option>
</component>
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="ed5c1bc7-e464-4bc7-9bca-6d0ac66e4659" />
</component>
</module>

@ -0,0 +1,9 @@
sonar.projectKey=test1
sonar.projectName=test1
sonar.projectVersion=1.0
sonar.sources=./src
sonar.java.binaries=./build/intermediates/javac/debug/classes
sonarsourceEncoding=UTF-8
sonar.language=java

@ -1,3 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11" project-jdk-type="Python SDK" />
</project>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/windows.iml" filepath="$PROJECT_DIR$/.idea/windows.iml" />
</modules>
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.11" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -27,7 +27,7 @@ class RegPictrue(QThread):
self.isOpen = True
self.last_words = ''
self.language = 'zh'
self.useTrans = 1
self.useTrans = 0
# 百度翻译
def translate_text_baidu(self, text, from_lang, to_lang):
@ -36,13 +36,12 @@ class RegPictrue(QThread):
def make_md5(s, encoding='utf-8'):
return md5(s.encode(encoding)).hexdigest()
id = '20220121001062201'
api_key = 'LxybddF5Y966dC1BXTc5'
id = '20231020001853940'
api_key = 'hOtWXt5nlbpUuCFX6r8D'
salt = random.randint(32768, 65536)
sign = make_md5(id + text + str(salt) + api_key)
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
params = {
'q': text,
'from': from_lang,
@ -53,6 +52,7 @@ class RegPictrue(QThread):
}
response = requests.post(base_url, params=params, headers=headers)
result = response.json()
print(result)
if 'trans_result' in result:
translated_text = result['trans_result'][0]['dst']
return translated_text
@ -118,14 +118,16 @@ class RegPictrue(QThread):
# 设置源语言和目标语言
from_language = 'auto' # 自动检测语言
to_language = self.getLanguage() # 翻译成各种语言
print(to_language)
if orgwords != self.last_words:
print(orgwords)
# # 记录代码开始执行的时间
# start_time = time.time()
# 调用翻译函数并输出结果
if self.useTrans == 0:
translated_text = self.translate_text_baidu('orgwords', from_language, to_language)
translated_text = self.translate_text_baidu(text=orgwords,
from_lang=from_language,
to_lang=to)
if translated_text == '翻译失败':
# self.useTrans += 1
pass
@ -153,7 +155,7 @@ class RegPictrue(QThread):
self.last_words = orgwords
sleep(0.1)
def setLanguage(self, language='zh'):
def setLanguage(self, language):
self.language = language
def getLanguage(self):

@ -1,185 +0,0 @@
import sqlite3
import os
current_path = os.path.dirname(os.path.abspath(__file__))
print(current_path)
DB_FOLDER = current_path
class DatabaseHandler:
def __init__(self, database):
self.database = os.path.join(DB_FOLDER, database)
self.conn = None
self.cur = None
def connect(self):
self.conn = sqlite3.connect(self.database)
self.cur = self.conn.cursor()
def create_table(self, table_name):
self.cur.execute(f"CREATE TABLE IF NOT EXISTS {table_name} (pid INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER, path VARCHAR, xOffset INTEGER, yOffset INTEGER, pOffsetX INTEGER, pOffsetY INTEGER, time INTEGER, rgb VARCHAR);")
self.conn.commit()
print('创建成功')
def insert_data(self, table_name, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb):
try:
self.cur.execute(f"SELECT MAX(pid) FROM {table_name}")
max_pid = self.cur.fetchone()[0]
if max_pid is not None:
pid = max_pid + 1
else:
pid = 1
self.cur.execute(
f"INSERT INTO {table_name} (pid, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
(pid, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb))
self.conn.commit()
print("数据插入成功")
except sqlite3.Error as e:
print(f"插入数据失败: {str(e)}")
def insert_pidData(self, table_name, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb, pid=None):
try:
self.cur.execute(f"SELECT MAX(pid) FROM {table_name}")
max_pid = self.cur.fetchone()[0]
if max_pid is not None:
if pid > max_pid:
pid = max_pid + 1
self.cur.execute(
f"INSERT INTO {table_name} (pid, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
(pid, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb))
self.conn.commit()
print("数据插入成功")
else:
for i in range(max_pid, pid - 1, -1):
self.cur.execute(
f"UPDATE {table_name} SET pid = ? WHERE pid = ?",
(i + 1, i))
self.cur.execute(
f"INSERT INTO {table_name} (pid, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
(pid, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb))
self.conn.commit()
print("数据插入成功")
else:
pid = 1
self.cur.execute(
f"INSERT INTO {table_name} (pid, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
(pid, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb))
self.conn.commit()
print("数据插入成功")
except sqlite3.Error as e:
print(f"插入数据失败: {str(e)}")
def execute_query(self, table_name, pid=None):
try:
if pid is None:
self.cur.execute(f"SELECT pid, * FROM {table_name}")
rows = self.cur.fetchall()
for row in rows:
pid = row[0] # 第0列是pid
data = row[1:] # 后续列为数据
print(f"pid: {pid}, data: {data}")
return rows # 返回所有行的结果集
else:
self.cur.execute(f"SELECT * FROM {table_name} WHERE pid = ?", (pid,))
row = self.cur.fetchone()
if row:
print(f"Row with pid {pid}: {row[1:]}")
else:
print(f"Row with pid {pid} not found")
return row[1:]
except Exception as e:
print(f"Error executing query on table {table_name}: {str(e)}")
def delete_table(self, table_name):
try:
self.cur.execute(f"DROP TABLE IF EXISTS {table_name}")
self.conn.commit()
print(f"Table {table_name} deleted")
except Exception as e:
print(f"Error deleting table {table_name}: {str(e)}")
def delete_row(self, table_name, pid):
try:
# 1. 获取删除行的pid和其后面的所有pid
self.cur.execute(f"SELECT pid FROM {table_name} WHERE pid >= ?", (pid,))
rows_to_update = self.cur.fetchall()
# 2. 删除指定行
self.cur.execute(f"SELECT path FROM {table_name} WHERE pid = ?", (pid,))
path = self.cur.fetchall()
self.cur.execute(f"DELETE FROM {table_name} WHERE pid = ?", (pid,))
# 3. 更新后面行的pid
for row in rows_to_update:
new_pid = row[0] - 1
self.cur.execute(f"UPDATE {table_name} SET pid = ? WHERE pid = ?", (new_pid, row[0]))
self.conn.commit()
print(f"Row with pid {pid} deleted from {table_name}")
return path
except Exception as e:
print(f"An error occurred: {e}")
return None
def get_max_pid(self, table_name):
try:
self.cur.execute(f"SELECT MAX(pid) FROM {table_name}")
max_pid = self.cur.fetchone()[0]
if max_pid is not None:
return max_pid
else:
return 0
except sqlite3.Error as e:
print(f"获取最大 pid 失败: {str(e)}")
return 0
def close(self):
self.conn.close()
# 示例用法
class DatabaseDatum:
def __init__(self, *args):
self.id = args[0]
self.path = args[1]
self.xOffset = args[2]
self.yOffset = args[3]
self.pOffsetX = args[4]
self.pOffsetY = args[5]
self.time = args[6]
self.rgb = args[7]
'''def get_path_by_pid(self, tablename, pid):
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
query = f"SELECT path FROM {tablename} WHERE pid = ?;"
db.cur.execute(query, (pid,))
result = db.cur.fetchone()
db.close()
if result:
self.path = result[0]
else:
self.path = None
return self.path
'''
# 创建一个DatabaseDatum对象
# 调用get_path_by_pid
#(datum.get_path_by_pid('rule10',1))
# db = DatabaseHandler(database='test2.sqlite3')
# db.connect()
# path = db.delete_row('rule13', 3)
#
# if path and len(path) > 0:
# result = path[0][0]
# print(result)
# else:
# print("No path found")
#
# db.close()
#

@ -17,10 +17,16 @@ class DatabaseHandler:
self.cur = self.conn.cursor()
def create_table(self, table_name):
self.cur.execute(
f"CREATE TABLE IF NOT EXISTS {table_name} (pid INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER, path VARCHAR, xOffset INTEGER, yOffset INTEGER, pOffsetX INTEGER, pOffsetY INTEGER, time INTEGER, rgb VARCHAR);")
self.conn.commit()
print('创建成功')
try:
self.cur.execute(
f"CREATE TABLE IF NOT EXISTS {table_name} (pid INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER, path VARCHAR, xOffset INTEGER, yOffset INTEGER, pOffsetX INTEGER, pOffsetY INTEGER, time INTEGER, rgb VARCHAR);")
self.conn.commit()
print('创建成功')
except Exception as e:
# 异常处理代码
print(f"Exception: {e}")
# 可以在这里添加其他异常处理逻辑,比如记录日志或者进行回滚操作
def insert_data(self, table_name, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb):
try:

@ -1,10 +1,13 @@
import time
import cv2
from windows.res.tools.recognise_words import Recognise_word
import time
import subprocess
import pyautogui as p
import cv2
from windows.res.tools.deal_picture import DealPicture
from windows.res.tools.recognise_words import Recognise_word
class operation:
@ -20,11 +23,14 @@ class operation:
@staticmethod
def find_photo_position(photo_str):
photo = cv2.imread(photo_str)
position = DealPicture.find_photo_position(photo)
if position is not None:
return position
return None
try:
photo = cv2.imread(photo_str)
position = DealPicture.find_photo_position(photo)
if position is not None:
return position
return None
except Exception as e:
print(f'发生错误: {e}')
@staticmethod
def position_translate(x, y):
@ -33,7 +39,7 @@ class operation:
return position
@staticmethod
def drag_once(drop_position, xOffset=None, yOffset=None, pOffsetX=None, pOffsetY=None):
def drag_once1(position, xOffset=None, yOffset=None, pOffsetX=None, pOffsetY=None):
offsetx = 0
offsety = 0
poffsetx = 0
@ -47,92 +53,102 @@ class operation:
if pOffsetY:
poffsety = pOffsetY
position_x = drop_position['left'] + drop_position['width'] / 2
position_y = drop_position['top'] + drop_position['height'] / 2
if isinstance(position, tuple):
# 将元组转换为字典
position_dict = {
'left': position[0],
'top': position[1],
'width': position[2],
'height': position[3]
}
else:
position_dict = position
x, y = (position_dict['left'] + position_dict['width'] / 2), (
position_dict['top'] + position_dict['height'] / 2)
# 长按鼠标左键
p.mouseDown(x=x + poffsetx, y=y + poffsety, button='left')
# 向上移动鼠标这里移动了100像素可以根据需要调整
p.moveRel(offsetx, offsety, duration=1)
# 延迟一段时间
time.sleep(0.2)
# 松开鼠标左键
p.mouseUp(x=x + poffsetx + offsetx, y=y + poffsety + offsety, button='left')
time.sleep(0.3)
if True:
x, y = position_x, position_y
# 长按鼠标左键
p.mouseDown(x=x + poffsetx, y=y + poffsety, button='left')
# 向上移动鼠标这里移动了100像素可以根据需要调整
p.moveRel(offsetx, offsety, duration=1)
# 延迟一段时间
time.sleep(0.2)
# 松开鼠标左键
p.mouseUp(x=x + poffsetx + offsetx, y=y + poffsety + offsety, button='left')
time.sleep(0.3)
@staticmethod
def left_drag(position, distence, xoffset=None, yoffset=None):
if position is None:
print('位置为空')
return False
if xoffset is not None:
if xoffset is not None and xoffset != '':
x = xoffset
else:
x = 0
if yoffset is not None:
if yoffset is not None and yoffset != '':
y = yoffset
else:
y = 0
operation.drag_once(position, (-distence), 0, x, y)
operation.drag_once1(position, (-distence), 0, x, y)
@staticmethod
def right_drag(position, distence, xoffset=None, yoffset=None):
if position is None:
print('位置为空')
return False
if xoffset is not None:
if xoffset is not None and xoffset != '':
x = xoffset
else:
x = 0
if yoffset is not None:
if yoffset is not None and yoffset != '':
y = yoffset
else:
y = 0
operation.drag_once(position, distence, 0, x, y)
operation.drag_once1(position, distence, 0, x, y)
@staticmethod
def up_drag(position, distence, xoffset=None, yoffset=None):
if position is None:
print('位置为空')
return False
if xoffset is not None:
if xoffset is not None and xoffset != '':
x = xoffset
else:
x = 0
if yoffset is not None:
if yoffset is not None and yoffset != '':
y = yoffset
else:
y = 0
operation.drag_once(position, 0, (-distence), x, y)
operation.drag_once1(position, 0, (-distence), x, y)
@staticmethod
def down_drag(position, distence, xoffset=None, yoffset=None):
if position is None:
print('位置为空')
return False
if xoffset is not None:
if xoffset is not None and xoffset != '':
x = xoffset
else:
x = 0
if yoffset is not None:
if yoffset is not None and yoffset != '':
y = yoffset
else:
y = 0
operation.drag_once(position, 0, distence, x, y)
operation.drag_once1(position, 0, distence, x, y)
@staticmethod
def click_long(position, xoffset=None, yoffset=None):
if position is None:
print('位置为空')
return False
if xoffset is not None:
if xoffset is not None and xoffset != '':
x = xoffset
else:
x = 0
if yoffset is not None:
if yoffset is not None and yoffset != '':
y = yoffset
else:
y = 0
@ -154,10 +170,117 @@ class operation:
@staticmethod
def keyin(words):
time.sleep(2)
try:
time.sleep(2)
# 使用typewrite函数输入符号
p.typewrite(words)
# 等待一段时间,然后关闭窗口
time.sleep(2)
except Exception as e:
print(f'发生错误: {e}')
@staticmethod
def find_once(photo):
try:
click_photo = cv2.imread(photo)
positions = p.locateCenterOnScreen(click_photo, confidence=0.8)
if positions is not None:
time.sleep(0.1)
return True
else:
raise Exception('未找到图像')
except Exception as e:
print(f'发生错误: {e}')
@staticmethod
def mouse_to_lefttop():
p.moveTo(10, 10, duration=0.3)
@staticmethod
def click_position_once(position):
# 检查变量是否为元组
if isinstance(position, tuple):
# 将元组转换为字典
position_dict = {
'left': position[0],
'top': position[1],
'width': position[2],
'height': position[3]
}
else:
position_dict = position
x, y = (position_dict['left'] + position_dict['width'] / 2), (
position_dict['top'] + position_dict['height'] / 2)
p.click(x, y)
time.sleep(0.1)
operation.mouse_to_lefttop()
@staticmethod
def click_once1(photo):
try:
click_photo = cv2.imread(photo)
positions = p.locateCenterOnScreen(click_photo, confidence=0.8)
if positions is not None:
x, y = positions.x, positions.y
p.click(x, y)
time.sleep(0.1)
return True
else:
raise Exception('未找到图像')
except Exception as e:
print(f'发生错误: {e}')
@staticmethod
def click_once(photo, pOffsetX=None, pOffsetY=None):
try:
poffsetx = 0
poffsety = 0
if pOffsetX:
poffsetx = pOffsetX
if pOffsetY:
poffsety = pOffsetY
positions = p.locateCenterOnScreen(photo, confidence=0.8)
x, y = positions.x + poffsetx, positions.y + poffsety
p.click(x, y)
time.sleep(0.1)
operation.mouse_to_lefttop()
return True
except Exception as e:
print(f'发生错误: {e}')
@staticmethod
def open_program(program_path):
try:
subprocess.Popen([program_path])
print(f"成功打开程序:{program_path}")
except FileNotFoundError:
print(f"找不到程序:{program_path}")
@staticmethod
def delay():
time.sleep(0.1)
@staticmethod
def click_fixed_point(x, y):
p.click(x, y)
# 使用typewrite函数输入符号
p.typewrite(words)
# 等待一段时间,然后关闭窗口
time.sleep(2)

@ -34,7 +34,8 @@ class MyApp(QMainWindow):
self.orderSelect_window = orderselet(self)
# 初始化主界面的按钮
self.addRuleBtn = self.findChild(QPushButton, 'addRuleBtn')
self.delRuleBtn = self.findChild(QPushButton, 'delRuleBtn')
self.delruleBtn = self.findChild(QPushButton, 'delRuleBtn')
self.delruleBtn.clicked.connect(self.delete_genrule)
self.translateBtn = self.findChild(QPushButton, 'translateBtn')
self.autoplay = self.findChild(QPushButton, 'autoGameBtn')
self.ruleList = self.findChild(QListWidget, 'ruleList')
@ -56,8 +57,9 @@ class MyApp(QMainWindow):
self.ruleList.itemClicked.connect(self.onItemClicked)
self.listIndexs = self.get_item_indexs(self.ruleList)
self.add_listitem()
self.delruleBtn = self.findChild(QPushButton, 'delRuleBtn')
self.delruleBtn.clicked.connect(self.delete_genrule)
self.orgshow = True
self.transshow = True
def startgame(self, orderlist):
# genrule_count = orderlist.count() # 获取 QListWidget 中的列表项数量
@ -80,9 +82,8 @@ class MyApp(QMainWindow):
self.my_thread.start()
def on_thread_finished(self):
# 此方法将在线程完成其工作时调用
# 在线程完成后执行任何其他操作
print('over')
pass
def delete_genrule(self):
db = DatabaseHandler(database='test2.sqlite3')
@ -170,10 +171,16 @@ class MyApp(QMainWindow):
self.regPicture.start()
def orgWords(self, owords):
self.translate_window.orgwords.setText(owords)
if self.orgshow:
self.orgshow = False
self.translate_window.orgwords.setText(owords)
self.orgshow = True
def translate_words(self, twords):
self.translate_window.transwords.setText(twords)
if self.transshow:
self.transshow = False
self.translate_window.transwords.setText(twords)
self.transshow = True
def selectTransLanguage(self, index): # 各种语言选项的返回值
selected_language = self.language.itemText(index)
@ -187,7 +194,6 @@ class MyApp(QMainWindow):
elif selected_language == "中文":
self.select_language = "zh"
# def show_orderselect_window(self):
# item_states = self.get_item_states(self.ruleList)
# for item_text, item_state in item_states.items():
# if item_state == Qt.Checked:
@ -210,7 +216,6 @@ class MyApp(QMainWindow):
self.orderSelect_window.show()
def show_settingrule_window(self):
self.showMinimized()
self.setRule_window.show()
# self.setRule_window.setWindowFlags(Qt.WindowStaysOnTopHint) # 设置为最上层

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import sys
# Form implementation generated from reading ui file 'operationSelect_window.ui'
#
@ -10,13 +10,21 @@
from tkinter import filedialog
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QWidget, QApplication, QLabel
import sys
from time import sleep
from PyQt5.QtWidgets import QWidget, QLabel
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QLineEdit, QPushButton, QTextEdit
from pyqt5_plugins.examplebuttonplugin import QtGui
from control.database.sqdatabase import *
import cv2
from res.pictures.ScreenCapture import ScreenCapture
from res.rules.howoperation import DatabaseControl
from io import StringIO
from windows.control.controltools.setShotArea import SetShotArea
class operatation_select(object):
@ -302,6 +310,12 @@ class operatation_select(object):
self.shothoto.setObjectName("shothoto")
self.shothoto.clicked.connect(self.getJpgPath)
self.getarea = QtWidgets.QPushButton(self.widget_10)
self.getarea.setGeometry(QtCore.QRect(220, 20, 71, 41))
self.getarea.setObjectName("shothoto")
self.getarea.clicked.connect(self.get_area)
self.up_photo = QtWidgets.QPushButton(self.widget_10)
self.up_photo.setGeometry(QtCore.QRect(310, 20, 71, 41))
self.up_photo.setObjectName("up_photo")
@ -386,16 +400,18 @@ class operatation_select(object):
self.confirmBtn.setText(_translate("Form", "确认"))
self.comboBox.setItemText(0, _translate("Form", "图片"))
self.comboBox.setItemText(1, _translate("Form", "文字"))
self.comboBox.setItemText(2, _translate("Form", "固定"))
self.comboBox.setItemText(2, _translate("Form", "区域中心"))
self.position_word.setText(_translate("Form", "<html><head/><body><p>位置:</p></body></html>"))
self.shothoto.setText(_translate("Form", "截图"))
self.up_photo.setText(_translate("Form", "上传"))
self.getarea.setText(_translate("Form", "截区域"))
self.position_offset.setText(
_translate("Form", "<html><head/><body><p>位置偏移从0或图片文字开始</p></body></html>"))
self.x_word.setText(_translate("Form", "x"))
self.y_word.setText(_translate("Form", "y"))
self.distence_word.setText(_translate("Form", "距离:"))
self.photo_name_word.setText(_translate("Form", "<html><head/><body><p>图片名字</p></body></html>"))
self.photo_name_word.setText(_translate("Form", "<html><head/><body><p>内容</p></body></html>"))
self.delay_time_word.setText(_translate("Form",
"<html><head/><body><p><span style=\" font-size:18pt; "
"font-weight:600; font-style:italic;\">延时时间:</span></p></body></html>"))
@ -409,14 +425,26 @@ class operatation_select(object):
self.up_photo.setVisible(True)
self.shothoto.setVisible(True)
self.word.setVisible(False)
self.getarea.setVisible(False)
elif selected_option == "文字":
self.up_photo.setVisible(False)
self.shothoto.setVisible(False)
self.word.setVisible(True)
elif selected_option == "固定点":
self.word.setVisible(False)
self.getarea.setVisible(False)
elif selected_option == "区域中心点":
self.up_photo.setVisible(False)
self.shothoto.setVisible(False)
self.word.setVisible(False)
self.getarea.setVisible(True)
def get_area(self):
shot = SetShotArea()
position = shot.setShotArea()
left_value = position['left'] # 获取 left 对应的值
top_value = position['top'] # 获取 top 对应的值
width_value = position['width'] # 获取 width 对应的值
height_value = position['height'] # 获取 height 对应的值
self.photo_name.setText(f'{left_value},{top_value},{width_value},{height_value}')
def getJpgPath(self): # 20 找到图片
@ -470,7 +498,7 @@ class operatation_select(object):
self.position_offset, self.x_word,
self.y_word, self.xposition, self.yposition,
self.distence_word, self.distence,
self.times, self.delay_time,
self.times, self.delay_time, self.photo_name_word, self.photo_name
]
self.set_visibility(targets)
elif label.text() == '右滑操作':
@ -480,7 +508,7 @@ class operatation_select(object):
self.position_offset, self.x_word,
self.y_word, self.xposition, self.yposition,
self.distence_word, self.distence,
self.times, self.delay_time,
self.times, self.delay_time, self.photo_name_word, self.photo_name
]
self.set_visibility(targets)
elif label.text() == '上滑操作':
@ -490,7 +518,7 @@ class operatation_select(object):
self.position_offset, self.x_word,
self.y_word, self.xposition, self.yposition,
self.distence_word, self.distence,
self.times, self.delay_time,
self.times, self.delay_time, self.photo_name_word, self.photo_name
]
self.set_visibility(targets)
elif label.text() == '下滑操作':
@ -500,13 +528,13 @@ class operatation_select(object):
self.position_offset, self.x_word,
self.y_word, self.xposition, self.yposition,
self.distence_word, self.distence,
self.times, self.delay_time,
self.times, self.delay_time, self.photo_name_word, self.photo_name
]
self.set_visibility(targets)
elif label.text() == '打开文件':
targets = [
self.position_word,
self.up_photo,
self.up_photo,self.photo_name_word, self.photo_name
]
self.set_visibility(targets)
elif label.text() == '点击操作':
@ -515,7 +543,7 @@ class operatation_select(object):
self.shothoto, self.up_photo,
self.position_offset, self.x_word,
self.y_word, self.xposition, self.yposition,
self.times, self.delay_time
self.times, self.delay_time, self.photo_name_word, self.photo_name
]
self.set_visibility(targets)
elif label.text() == '长按操作':
@ -524,7 +552,7 @@ class operatation_select(object):
self.shothoto, self.up_photo,
self.position_offset, self.x_word,
self.y_word, self.xposition, self.yposition,
self.times, self.delay_time
self.times, self.delay_time, self.photo_name_word, self.photo_name
]
self.set_visibility(targets)
elif label.text() == '开始循环':
@ -535,7 +563,7 @@ class operatation_select(object):
elif label.text() == '输入操作':
targets = [
self.word
self.photo_name_word, self.photo_name
]
self.set_visibility(targets)
@ -553,7 +581,7 @@ class operatation_select(object):
self.word, self.position_offset, self.x_word,
self.y_word, self.xposition, self.yposition,
self.distence_word, self.distence, self.delay_time_word,
self.times
self.times, self.photo_name_word, self.photo_name, self.getarea
]
# elements = [
# self.click_position, self.delay_time, self.comboBox,
@ -571,158 +599,14 @@ class operatation_select(object):
element.setVisible(True)
# 操作函数---------------------------------------------
# 展示数据库条目
def create_userGeneralRule(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = values[14]
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
db.create_table(table_name)
db.insert_data('userGeneralRule', 0, table_name, 0, 0, 0, 0, 0, 0)
db.close()
def getrule(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = values[9]
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
db.cur.execute(f"SELECT * FROM {table_name}")
data = db.cur.fetchall()
display_text = ""
if table_name.startswith("gen"):
# 表示以 "gen" 开头
# 这里写下你的代码
for row in data:
text = f"序号: {row[0]}\n规则号: {row[1]}\n\n"
display_text += text
else:
for row in data:
text = f"序号: {row[0]}\n操作号: {row[1]}\n数据: {row[2:]}\n\n"
display_text += text
self.text_display.setText(display_text)
db.close()
def show_rules(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = 'userConcreteRule'
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
db.cur.execute(f"SELECT * FROM {table_name}")
data = db.cur.fetchall()
display_text = ""
for row in data:
text = f"序号: {row[0]}\n名称: {row[2]}\n\n"
display_text += text
self.text_display.setText(display_text)
db.close()
# db.cur.execute(f"SELECT MAX(pid) FROM {table_name}")
# max_pid = db.cur.fetchone()[0]
#
# print(max_pid)
#
# if max_pid is not None:
# id = 1
# while id < max_pid:
#
# db_data = db.execute_query(table_name, id)
# # 将元组数据转换为字符串
# text = f"ID: {db_data[0]}\nFilename: {db_data[1]}\nData: {db_data[2:]}"
# id = max_pid + 1
#
# self.text_display.setText(text)
# sleep(1)
#
# db.execute_query(table_name)
#
# db.close()
def startRule(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = values[9]
db_control = DatabaseControl(database='test2.sqlite3')
db_control.perform_operations(table_name)
db_control.close()
def startGen(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
gen_name = values[14]
db_control = DatabaseControl(database='test2.sqlite3')
db_control.perform_userGeneralRulename(gen_name)
db_control.close()
def getJpgInputs(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = values[11]
id = values[13]
sc = ScreenCapture()
path = sc.capture_screen()
if path != None:
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
db.insert_data(table_name, id, path, 0, 0, 0, 0, 0, 0)
db.execute_query(table_name)
db.close()
def getDelInputs(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = values[9]
row = values[10]
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
path = db.delete_row(table_name, row)
if path and len(path) > 0:
result = path[0][0]
print(result)
current_working_directory = os.getcwd() + '/res/pictures/' + result
print(current_working_directory)
operatation_select.delete_file(current_working_directory)
else:
print("No path found")
db.execute_query(table_name)
db.close()
def select_file(self):
file_path = filedialog.askopenfilename()
@ -754,102 +638,174 @@ class operatation_select(object):
if label.text() == '延时操作':
id = 13
time = self.delay_time.text()
elif label.text() == '左滑操作':
id = 3
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
current_text = self.comboBox.currentText()
if current_text == '图片':
id = 31 # 出现图片后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '文字':
id = 32 # 出现文字后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '区域中心点':
id = 33
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
elif label.text() == '右滑操作':
id = 4
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
current_text = self.comboBox.currentText()
if current_text == '图片':
id = 41 # 出现图片后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '文字':
id = 42 # 出现文字后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '区域中心点':
id = 43
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
elif label.text() == '上滑操作':
id = 5
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
current_text = self.comboBox.currentText()
if current_text == '图片':
id = 51 # 出现图片后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '文字':
id = 52 # 出现文字后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '区域中心点':
id = 53
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
elif label.text() == '下滑操作':
id = 6
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
current_text = self.comboBox.currentText()
if current_text == '图片':
id = 61 # 出现图片后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '文字':
id = 62 # 出现文字后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '区域中心点':
id = 63
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
elif label.text() == '打开文件':
id = 15
path = self.photo_name.text()
elif label.text() == '点击操作':
id = 20 # 出现图片后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
current_text = self.comboBox.currentText()
if current_text == '图片':
id = 91 # 出现图片后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '文字':
id = 92 # 出现文字后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '区域中心点':
id = 93
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
elif label.text() == '长按操作':
id = 2
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
current_text = self.comboBox.currentText()
if current_text == '图片':
id = 71 # 出现图片后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '文字':
id = 72 # 出现文字后点击
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
if current_text == '区域中心点':
id = 73
path = self.photo_name.text()
pOffsetX = self.xposition.text()
pOffsetY = self.yposition.text()
rgb = self.distence.text()
time = self.delay_time.text()
elif label.text() == '开始循环':
id = 16
elif label.text() == '输入操作':
id = 30
path = self.photo_name.text()
# path = values[2]
# xOffset = values[3]
# yOffset = values[4]
# pOffsetX = values[5]
# pOffsetY = values[6]
# time = values[7]
# rgb = values[8]
# pid = values[12]
values = [id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb]
self.last_window.set_word(values)
#
# db = DatabaseHandler(database='test2.sqlite3')
# db.connect()
# if pid == '':
# db.insert_data(table_name, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb)
# else:
# pid = int(pid)
# db.insert_pidData(table_name, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb, pid)
# db.execute_query(table_name)
# db.close()
# print('插入值:', values)
def create_table(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = values[0]
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
db.create_table(table_name)
db.close()
def del_table(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = values[0]
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
db.delete_table(table_name)
db.close()
def delete_file(file_path):
try:
@ -865,21 +821,4 @@ class operatation_select(object):
self.textEdit.moveCursor(QtGui.QTextCursor.End)
self.textEdit.insertPlainText(text)
def save_rules(self):
values = []
for input_box in self.inputs:
value = input_box.text()
values.append(value)
table_name = 'userConcreteRule'
path = values[0]
db = DatabaseHandler(database='test2.sqlite3')
db.connect()
db.insert_data(table_name, 0, path, 0, 0, 0, 0, 0, 0)
db.execute_query(table_name)
db.close()
print('保存表:', values[0])

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save