o4ifddlZddlZdZdZdZdZedk(rejeyy)Nc ddl}ddlm}ddlm}m}m}d}|j|d}|jd d d | |jd ddddd|jdddddd|jdddddd|jdd d!ddd"|jd#d$d%d&td'd(d)*|jd+d,d-d&tdd(d.*|jd/d01|j}|jr td} |jrStjj!|j"rt|j"}|S||j"d2t%|j"|j&|j(|j*|j,d} |S#t.$rJ} t1d3j3| j4| j6t8j:4Yd} ~ |Sd} ~ wt<$r5} t1d5j3| t8j:4Yd} ~ |Sd} ~ w|||f$r&} t1| t8j:4Yd} ~ |Sd} ~ wt>$ri} |jr&ddl } | jBt9jDn,t1d6j3||7t8j:4Yd} ~ |Sd} ~ wwxYw)8z# Convert a .ui file to a .py file. rN)PYQT_VERSION_STR)NoSuchClassErrorNoSuchWidgetErrorUIFileExceptionpyuic6zPython User Interface Compiler)prog descriptionz-Vz --versionversion)actionr z-pz --previewpreview store_trueFz3show a preview of the UI instead of generating code)destr defaulthelpz-oz--outputoutput-FILEz.write generated code to FILE instead of stdout)rrmetavarrz-xz --executeexecutez1generate extra code to test and display the classz-dz--debugdebugzshow debug outputz-iz--indentindentstoreNz8set indent width to N spaces, tab if N is 0 [default: 4])rr typerrrz-wz --max-workers max_workerszLuse a maximum of N worker processes when converting a directory [default: 0]uizGthe .ui file created by Qt Designer or a directory containing .ui files)rzmust be a filezError: {0}: '{1}')filezError in input file: {0}a@An unexpected error occurred. Check that you are using the latest version of {name} and send an error report to the PyQt mailing list and include the following information: - your version of {name} ({version}) - the .ui file that caused this error - the debug output of {name} (use the --debug flag when calling {name}))namer )#argparse PyQt6.QtCorer exceptionsrrrArgumentParser add_argumentint parse_argsrconfigure_loggingrospathisfilergeneraterrrrIOErrorprintformatstrerrorfilenamesysstderr SyntaxError Exception tracebackprint_exceptionexc_info) r"rrrr PROGRAM_NAMEparserargs exit_statuser7s [/mnt/ssd/data/python-lab/DaemonControl/venv/lib/python3.12/site-packages/PyQt6/uic/pyuic.pymainr@s-L $ $,8%:F k)$& k ,FH jxAC k ,DF igl 35 jxaKM oMa_a Z\    D zzK!Q <<ww~~dgg&%dgg. @ =&dgg/?@@ TWWdkk4;; $$ &K4 1 ! !((QZZ@ZZ ! !. ) E (//2DD& # / A" acjj!!   Q ::  %I % %s||~ 6 K LR6Wcm}6K~FIFPFP  Q  QsEA F6AF66 K!??H K!*I K! I,, K!8AKK!cddl}|j}|j|jd|j d}|j ||j |jy)z* Configure logging when debug is enabled. rNz%(name)s: %(message)sz PyQt6.uic)logging StreamHandler setFormatter Formatter getLogger addHandlersetLevelDEBUG)rBhandlerloggers r?r)r)ls]##%G **+BCD   { +F g OOGMM"cZddlm}tjj |rndk(rd}nQtjj stjj sfd}n |d|dddlm}||d |||| ytjj r |d |ddd lm}dk(r2d dl } | jtjjd} d } ntdd} d} ||| ||| r| jyy)z Generate the Python code. r)rrNc |fS)N)dfrs r?zgenerate..s {rLzmust be a directory as z is a directory) compileUiDirF)recursemaprrrzcannot be a directory unless ) compileUirutf8)encodingwtT)r$rr*r+isdirexists compile_uirSrVio TextIOWrapperr3stdoutbufferopenclose) ui_filerrrrrrUrSrVr]pyfile needs_closes ` r?r-r-ys, ww}}W S=C WW]]6 ""''..*@*C!&-gYoFH H -We+w 0 v f/yHJ J * S= %%cjj&7&7&%IFK&$8FK'67F3  LLN rLc|ddlm}ddlm}||g}||}|j |j S)z` Preview the .ui file. Return the exit status to be passed back to the parent process. r) QApplicationr)loadUi)PyQt6.QtWidgetsrgload_uirhshowexec)rcrgrhapprs r?rrs4 - y !C BGGI 88:rL__main__)r*r3r@r)r-r__name__exitrOrLr?rqsC& Rj #%P" z CHHTVrL