%PDF- %PDF-
Mini Shell

Mini Shell

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

�

=	f�(���ddlZddl�ddlmZddlmZddl�ddlm	Z	ddl
�ddl�ddl�ddl
mZddlmZGd	�d
ee�Zy)�N)�*)�device)�cups)�
to_unicode�)�	Ui_Dialog)�&DEVICEURICOMBOBOX_TYPE_PRINTER_AND_FAXc�>�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d
d	�Z
y)�
InfoDialogc��tj||�||_|j|�|j	�t
j
d|j�y)Nr)�QDialog�__init__�
device_uri�setupUi�initUi�QTimer�
singleShot�updateUi)�self�parentrs   �"/usr/share/hplip/ui5/infodialog.pyrzInfoDialog.__init__+sB������v�&�$������T�����
����!�T�]�]�+�c	�$�|jjj|j�|jj
j|j
�|jjj|j�|jttdd���|jr%|jj|j�|jjt�|jd�|jd�g|_|jd�d|jd�|jd�|jd�|jd	�|jd
�g|_y)N�hp_logo�128x128�Key�Valuez	Date/Timez
Event Code�Description�UserzCUPS Job IDz
Doc. Title)�CancelButton�clicked�connect�CancelButton_clicked�DeviceComboBox�DeviceUriComboBox_noDevices� DeviceUriComboBox_currentChanged�
setWindowIcon�QIcon�load_pixmapr�setInitialDevice�setTyper	�_InfoDialog__tr�headers�history_headers�rs rrzInfoDialog.initUi5s"�����!�!�)�)�$�*C�*C�D����7�7�?�?��@`�@`�a����<�<�D�D�T�Ej�Ej�k�	
���5��Y�	�!B�C�D��?�?����0�0����A����#�#�$J�K��	�	�%�(�$�)�)�G�*<�=��� $�	�	�+� 6�� $�	�	�,� 7����=�9Q� $�	�	�&� 1�4�9�9�]�3K� $�	�	�,� 7� 9��rc�8�|jj�y�N)r$rr/s rrzInfoDialog.updateUiJs�����$�$�&rc��tjttj��|j
j
�|j
jd�|j
jd�tjtjz}|jj�dkDr9|jjd�|jj�dkDr�9|j
j
�|j
jd�|j
jt|j��|j
j!|j�	t#j$|j&d�}|j0j
�|j0jt|j��|j0j!|j�t3|j4j7��}|j9�|j0jt|��t;|�D]�\}}t=t?|��}|jA|�|j0jC|d|�t=t?|j4|��}|jA|�|j0jC|d|���|j0jEd�|j0jEd�|j0jGd�|j0jId�		|jK�|jM�t3|jPj7��}|j9�|j
jt|��t;|�D]�\}}t=t?|��}|jA|�|j
jC|d|�t=t?|jP|��}|jA|�|j
jC|d|���|j
jEd�|j
jEd�|j
jGd�|j
jId�|jO�|jRj
�|jRjd�|jTtVk(r|j/d�|jXd<n|j/d�|jXd<|jRjt|jX��|jRj!|jX�|j[�}	|	j]�|jRjt|	��t;|	�D]�\}}
t_�}|jatc|
jd��tg|�}t#jh|
jjd�}t;||
jlto|
jj�||
jpto|
jr�|
jtg�D]G\}
}t=t?|��}|jA|�|jRjC||
|��I��|jRjEd�|jRjEd�|jRjGd�|jRjId�twjx�}|D�]p}|j&|j&k(s�t{�}|j}t?|j~��t�|�}|j}t?d|j~z��t�|�}|j�d�|j�t�j��|j�t�j��|j�t�j��|j�t�j��|j�tj��|j}t?d	|j~z��|j�|dddd�|jj�|t?|j~��|jt|j��|j!|j�twj��twj�|j~�t�twj���}	tKt�j�j�d
��}|j��}|j��D]}|j~|vs�||d<n|j/d�|d<	t3|j7��}|j9�|jt|��t;|�D�]4\}}t=t?|��}|jA|�|jC|d|�|dk(r�tc||�}|tvj�k(rt=|j/d|z��}n�|tvj�k(rt=|j/d|z��}n]|tvj�k(rt=|j/d|z��}n,t=t?|��}nt=t?||��}|jA|�|jC|d|���7|jEd�|jEd�|jGd�|jId���stwj��|jj�d�tj+�y#t($r?tj+�t-||j/d|j&z��YywxYw#t($rV}tj+�t-||j/d|j&z��Yd}~|jO�yd}~wwxYw#|jO�wxYw#t�$rC}t�j�t?|��t?d
t?|�z�|d<Yd}~��d}~wwxYw)Nr�z <b>Unable to open device %s.</b>rT�Fax�Printerz
GridLayout-%szTable-%sz~/.cups/lpoptions�lpoptions_file_dataz	(no data)z(%s)z
printer-statez	idle (%s)zbusy/printing (%s)zstopped (%s))a�QApplication�setOverrideCursor�QCursor�Qt�
WaitCursor�DynamicTableWidget�clear�setRowCount�setColumnCount�ItemIsSelectable�
ItemIsEnabled�	TabWidget�count�	removeTab�lenr-�setHorizontalHeaderLabelsr�Devicer�Error�restoreOverrideCursor�	FailureUIr,�StaticTableWidget�list�mq�keys�sort�	enumerate�QTableWidgetItem�str�setFlags�setItem�resizeColumnToContents�setSortingEnabled�	sortItems�open�queryDevice�close�dq�HistoryTableWidget�device_type�DEVICE_TYPE_FAXr.�queryHistory�reverse�	QDateTime�	setTime_t�int�timedate�	value_str�queryString�
event_code�printer_namer�username�job_id�titler�getPrinters�QWidget�
setObjectName�name�QGridLayout�QTableWidget�setAlternatingRowColors�setSelectionMode�QAbstractItemView�SingleSelection�setSelectionBehavior�
SelectRows�setVerticalScrollMode�
ScrollPerItem�setHorizontalScrollMode�ScrollPerPixel�setGridStyle�DotLine�	addWidget�addTab�resetOptions�openPPD�dict�
getOptions�os�path�
expanduser�read�
splitlines�IOError�log�debug�IPP_PRINTER_STATE_IDLE�IPP_PRINTER_STATE_PROCESSING�IPP_PRINTER_STATE_STOPPED�closePPD�setCurrentIndex)r�flags�d�mq_keys�row�key�i�e�dq_keys�history�h�dt�ess�col�t�printers�p�Tab�
GridLayout�Table�current_options�f�textrN�states                         r�updateInfoTablezInfoDialog.updateInfoTableOs
���&�&�w�r�}�}�'=�>����%�%�'����+�+�A�.����.�.�q�1��#�#�b�&6�&6�6���n�n�"�"�$�q�(��N�N�$�$�Q�'��n�n�"�"�$�q�(�	
���%�%�'����+�+�A�.����.�.�s�4�<�<�/@�A����9�9�$�,�,�G�	��
�
�d�o�o�t�4�A�	
���$�$�&����-�-�c�$�,�,�.?�@����8�8����F��q�t�t�y�y�{�#���������*�*�3�w�<�8�!�'�*�	6�H�C�� ��S��*�A�
�J�J�u���"�"�*�*�3��1�5� ��Q�T�T�#�Y��0�A�
�J�J�u���"�"�*�*�3��1�5�	6�	
���5�5�a�8����5�5�a�8����0�0��6����(�(��+�	�
������
�
���1�4�4�9�9�;�'�G��L�L�N��#�#�/�/��G��=�%�g�.�
;���S�$�S��X�.���
�
�5�!��'�'�/�/��Q��:�$�S����c��^�4���
�
�5�!��'�'�/�/��Q��:�
;�
�#�#�:�:�1�=��#�#�:�:�1�=��#�#�5�5�d�;��#�#�-�-�a�0�
�G�G�I�	
���%�%�'����+�+�A�.��=�=�O�+�&*�i�i��&6�D� � ��#�&*�i�i�	�&:�D� � ��#����.�.�s�4�3G�3G�/H�I����9�9�$�:N�:N�O��.�.�"���������+�+�C��L�9���(�	=�F�C����B��L�L��Q�Z�Z��)��2��B��$�$�Q�\�\�1�5�C�#�R����%�a�l�l�3�S��:�:�z�!�(�(�';��7�7�%$�%�
=���Q�
%�S��V�,���
�
�5�!��'�'�/�/��S�!�<�
=�	=� 	
���6�6�q�9����6�6�q�9����1�1�$�7����)�)�!�,��#�#�%���G	#�A��|�|�t���.��i���!�!�#�a�f�f�+�.�(��-�
��(�(��_�q�v�v�-E�)F�G�$�S�)���-�-�d�3��&�&�'8�'H�'H�I��*�*�+<�+G�+G�H��+�+�,=�,K�,K�L��-�-�.?�.N�.N�O��"�"�2�:�:�.��#�#�C�
�Q�V�V�(;�$<�=��$�$�U�A�q�!�Q�7����%�%�c�3�q�v�v�;�7��$�$�S����%6�7��/�/����=��!�!�#����Q�V�V�$�"&�t���'8�"9��X��R�W�W�/�/�0C�D�E�A�
�6�6�8�D�!�_�_�.�X���6�6�Q�;�EF�O�,A�B�!�X�
BF���;�AW��(=�>��O�0�0�2�3���	�	���!�!�#�d�)�,� )�$��-�H�C��(��S��2�A��J�J�u�%��M�M�#�q�!�,��o�-� #�O�C�$8� 9�� �D�$?�$?�?� 0����;�u�;L�1M� N�A�"�d�&G�&G�G� 0����;O�PU�;U�1V� W�A�"�d�&D�&D�D� 0����>�%�;O�1P� Q�A� 0��U�� <�A�,�S���1E�-F�G���J�J�u�%��M�M�#�q�!�,�'-�*�,�,�Q�/��,�,�Q�/��'�'��-�����"�OG	#�R	
�
�
�����&�&�q�)��*�*�,��y�	��.�.�0��d�D�I�I�&H�$�/�/�&Z�[�\��		��L�
��2�2�4��$��	�	�*L�d�o�o�*^� _�`��.
�G�G�I��7
��6
�G�G�I��\�P��I�I�c�!�f�%�=@���A���=O�O�$9�:��P�s\�= q-�3 r8�E't�%(t/�-Ar5�4r5�8	t�<t�=t�t�t�t,�/	u;�88u6�6u;c�2�||_|j�yr1)rr�)rrs  rr&z+InfoDialog.DeviceUriComboBox_currentChanged#s��$������rc�Z�t||jd��|j�y)Nz<b>No devices found.</b>)rJr,rZr/s rr%z&InfoDialog.DeviceUriComboBox_noDevices(s���$��	�	�"<�=�>��
�
�rc�$�|j�yr1)rZr/s rr#zInfoDialog.CancelButton_clicked-s���
�
�rNc�0�tjd||�S)Nr)�qApp�	translate)r�s�cs   r�__trzInfoDialog.__tr4s���~�~�l�1�Q�/�/rr1)�__name__�
__module__�__qualname__rrrr�r&r%r#r,�rrrr*s,��,�9�*'�
Q-�h�
�
�0rr)�os.pathr��base.g�baser�prntr�
base.codes�base.sixextr�ui_utils�PyQt5.QtCore�PyQt5.QtGui�infodialog_baser�deviceuricomboboxr	r
rr�rr�<module>r�s>��.�����#����'�E�K0��)�K0r

Zerion Mini Shell 1.0