%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/hplip/ui5/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/hplip/ui5/__pycache__/devicesetupdialog.cpython-312.pyc

�

=	fF"���ddlZddlZddl�ddlmZmZddlmZddl�ddl	�ddl
�ddl�ddlm
Z
dZGd�dee
�Zy)	�N)�*)�device�pml)�cups�)�	Ui_Dialogc�t�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zdd�Zy)�DeviceSetupDialogc���tj||�|j|�||_i|_d|_|j
�tjd|j�y)Nr)
�QDialog�__init__�setupUi�
device_uri�mq�dev�initUi�QTimer�
singleShot�updateUi)�self�parentrs   �)/usr/share/hplip/ui5/devicesetupdialog.pyr
zDeviceSetupDialog.__init__+sP������v�&����T��$������������
����!�T�]�]�+�c��|jjj|j�|jj
j|j
�|jjj|j�|jjdtjdfi�|jttdd���|jr%|jj|j�|jj!|j#d�d�|jj!|j#d�d�|jj!|j#d	�d
�|jj!|j#d�d�|jj!|j#d
�d�|jj!|j#d�d�|jj$t&j|j(�|j*j,t.j|j0�y)N�power-settingsr�hp_logo�128x128z
15 minutes�z
30 minutes�z
45 minutes�-z1 hour�<z2 hours�xz3 hours�)�CancelButton�clicked�connect�CancelButton_clicked�DeviceComboBox�DeviceUriComboBox_noDevices� DeviceUriComboBox_currentChanged�	setFilter�operator�gt�
setWindowIcon�QIcon�load_pixmapr�setInitialDevice�DurationComboBox�addItem�_DeviceSetupDialog__tr�	activated�int�DurationComboBox_activated�
OnRadioButton�toggled�bool�OnRadioButton_toggled�rs rrzDeviceSetupDialog.initUi6s������!�!�)�)�$�*C�*C�D����7�7�?�?��@`�@`�a����<�<�D�D�T�Ej�Ej�k����%�%�'7�(�+�+�q�9I�&J�K�	
���5��Y�	�!B�C�D��?�?����0�0����A����%�%�d�i�i��&=�r�B����%�%�d�i�i��&=�r�B����%�%�d�i�i��&=�r�B����%�%�d�i�i��&9�2�>����%�%�d�i�i�	�&:�C�@����%�%�d�i�i�	�&:�C�@����'�'��,�4�4�T�5T�5T�U����"�"�4�(�0�0��1K�1K�Lrc���|jj�}|dk(ryt|jj|��\}}|sy|jt
k(r:|r|j
d�y|j
tj|d��y|jtk(rC|r |jtj�y|j|j|��yy)N����999�)r2�currentIndex�	value_int�itemData�power_settings�POWER_SETTINGS_EPML�setPowerSettingsEPML�string�zfill�POWER_SETTINGS_PML�setPowerSettingsPMLr�OID_POWER_SETTINGS_NEVER�getPMLSettingsValue)r�b�i�v�oks     rr;z'DeviceSetupDialog.OnRadioButton_toggledQs����!�!�.�.�0����7���$�/�/�8�8��;�<���2������"5�5���)�)�%�0��)�)�&�,�,�q�!�*<�=�
�
 �
 �$6�
6���(�(��)E�)E�F��(�(��)A�)A�!�)D�E�	7rc�8�|jj�y�N)r(rr<s rrzDeviceSetupDialog.updateUigs�����$�$�&rc��yrR�r<s r�updatePowerSettingsUiz'DeviceSetupDialog.updatePowerSettingsUiks��rc�p�t�	||_|j�|jj�t	j
|j�|_t	j|j�|_|jjdt�|_
|jjt|jtk7�|jtk(r|j�n#|jt k(r|j#�t%�y#t%�wxYw)Nr)�beginWaitCursorrr�closer�Device�queryModelByURIr�get�POWER_SETTINGS_NONErD�	TabWidget�
setTabEnabled�TAB_POWER_SETTINGSrE�updatePowerSettingsEPMLrI�updatePowerSettingsPML�
endWaitCursor)rrs  rr*z2DeviceSetupDialog.DeviceUriComboBox_currentChangedos�����	�(�D�O��x�x�#������ ��}�}�T�_�_�5�D�H��,�,�T�_�_�=�D�G�"&�'�'�+�+�.>�@S�"T�D���N�N�(�(�);�T�=P�=P�Tg�=g�h��"�"�&9�9��,�,�.��$�$�(:�:��+�+�-�
�O��M�O�s�DD)�)D5c��|j�}|dk(r7|jjd�|jjd�y|jjd�|jjd�t	|�}|j
j
|�}|dk7r|j
j|�yy)Nr?TFr>)�getPowerSettingsEPMLr8�
setChecked�OffRadioButtonr6r2�findData�setCurrentIndex�r�value�find�indexs    rr`z)DeviceSetupDialog.updatePowerSettingsEPML�s����)�)�+���E�>����)�)�$�/����*�*�5�1����)�)�%�0����*�*�4�0��u�:�D��)�)�2�2�4�8�E���{��%�%�5�5�e�<�rc��|jjdd�}tjd|z�|jj	�|ddS)N�F�Current power settings: %s��	)r�getDynamicCounter�log�debug�
closePrint)rrjs  rrdz&DeviceSetupDialog.getPowerSettingsEPML�sF�����*�*�3��6���	�	�.��6�7��������Q�q�z�rc��tjd|z�d|z}|jj|d��|jj	�y)N�Setting power setting to %szb%%-12345X@PJL ENTER LANGUAGE=PCL3GUI
E%%Pmech.set_battery_autooff %s;
udw.quit;*rCE%%-12345XT)�direct)rsrtr�	printDataru)rrj�pcls   rrFz&DeviceSetupDialog.setPowerSettingsEPML�sS���	�	�/�%�7�8�A�DI�I�	������3�t��,������rc��|j�}|tjk(r7|jj	d�|j
j	d�y|jj	d�|j
j	d�d}|tjk(rd}nm|tjk(rd}nW|tjk(rd}nA|tjk(rd}n+|tjk(rd}n|tjk(rd}|jj|�}|d	k7r|jj|�yy)
NTFrrr r!r"r#r>)�getPowerSettingsPMLrrKr8rerf�OID_POWER_SETTINGS_15MIN�OID_POWER_SETTINGS_30MIN�OID_POWER_SETTINGS_45MIN�OID_POWER_SETTINGS_1HR�OID_POWER_SETTINGS_2HR�OID_POWER_SETTINGS_3HRr2rgrhris    rraz(DeviceSetupDialog.updatePowerSettingsPML�s���(�(�*���C�0�0�0����)�)�$�/����*�*�5�1����)�)�%�0����*�*�4�0��D���4�4�4����#�6�6�6����#�6�6�6����#�4�4�4����#�4�4�4����#�4�4�4����)�)�2�2�4�8�E���{��%�%�5�5�e�<�rc���|jjtj�\}}|jj	�t
j
d|z�|S)Nro)r�getPMLr�OID_POWER_SETTINGS�closePMLrsrt)r�pml_result_coderjs   rr|z%DeviceSetupDialog.getPowerSettingsPML�sF��!%������1G�1G�!H�����������	�	�.��6�7��rc��tjd|z�|jjtj
|�}|jj
�y)Nrw)rsrtr�setPMLrr�r�)rrjr�s   rrJz%DeviceSetupDialog.setPowerSettingsPML�s>���	�	�/�%�7�8��(�(�/�/�#�*@�*@�%�H�������rc���|dk(ryt|jj|��\}}|sy|jtk(r;t�	|j
tj|d��t�y|jtk(r6t�	|j|j|��t�yy#t�wxYw#t�wxYw)Nr>r@)
rBr2rCrDrErWrFrGrHrbrIrJrL)rrNrOrPs    rr7z,DeviceSetupDialog.DurationComboBox_activated�s�����7���$�/�/�8�8��;�<���2������"5�5���
 ��)�)�&�,�,�q�!�*<�=���
�
 �
 �$6�
6���
 ��(�(��)A�)A�!�)D�E���7�������s�%C	� C�	C�C$c�6�tj}|dk(rtj}|S|dk(rtj}|S|dk(rtj}|S|dk(rtj}|S|dk(rtj
}|S|dk(rtj}|S)Nrrr r!r"r#)rr}r~rr�r�r�)rrO�xs   rrLz%DeviceSetupDialog.getPMLSettingsValue�s����(�(����7��,�,�A����"�W��,�,�A����"�W��,�,�A����"�W��*�*�A����#�X��*�*�A����#�X��*�*�A��rc�Z�t||jd��|j�y)Nz2<b>No devices that support device setup found.</b>)�	FailureUIr4rXr<s rr)z-DeviceSetupDialog.DeviceUriComboBox_noDevicess���$��	�	�"V�W�X��
�
�rc�p�|j�|jj�|j�yrR)rrXr<s rr'z&DeviceSetupDialog.CancelButton_clickeds#���8�8���H�H�N�N���
�
�rNc�0�tjd||�S)Nr
)�qApp�	translate)r�s�cs   r�__trzDeviceSetupDialog.__tr%s���~�~�1�!�A�6�6rrR)�__name__�
__module__�__qualname__r
rr;rrUr*r`rdrFrar|rJr7rLr)r'r4rTrrr
r
*sZ��,�M�6F�,'�
��F=�"��&=�<�� �*�&�
�7rr
)r,rG�base.g�baserr�prntr�
base.codes�ui_utils�PyQt5.QtCore�PyQt5.QtGui�devicesetupdialog_baserr_rr
rTrr�<module>r�sA��.�
��������.���|7���|7r

Zerion Mini Shell 1.0