00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 from qt import *
00012 from cdbVisCore import *
00013 from objectclasses import *
00014
00015
00016 inputOutput0_data = \
00017 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
00018 "\x49\x48\x44\x52\x00\x00\x00\x18\x00\x00\x00\x18" \
00019 "\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\x00\x00\x01" \
00020 "\xb7\x49\x44\x41\x54\x78\x9c\xed\x94\xbf\x4a\xc3" \
00021 "\x50\x14\xc6\xbf\x68\xd0\x68\x45\xc5\x41\x1f\xa1" \
00022 "\x55\x11\x1c\xc4\xc1\x42\x45\x1c\x2c\x28\xb6\x43" \
00023 "\x77\x17\xc1\xe9\x4e\xba\x88\xbe\x82\x20\x74\x10" \
00024 "\x9f\x21\x1d\x1c\x2c\xd4\x4a\x97\x62\x3b\xd4\xbe" \
00025 "\x42\x37\x05\x41\xa5\xd2\x36\x35\xb9\xd1\x1c\x87" \
00026 "\xd0\xb4\xc9\x6d\xa3\xed\xa2\x83\xdf\x74\xff\x70" \
00027 "\xbe\xdf\xfd\xce\x81\x0b\xfc\xeb\xb7\x25\x79\x0f" \
00028 "\x18\x63\x34\x88\x51\x32\x99\x14\xbc\x04\x31\xc6" \
00029 "\x48\x55\x55\xea\x57\xaa\xaa\x52\xaf\x87\xc9\xde" \
00030 "\x83\xdd\x58\x0c\xdc\x34\x71\x74\x78\xd8\x77\x0a" \
00031 "\xc6\x18\x79\x93\x08\x00\x5d\xe7\x38\x3d\x39\x46" \
00032 "\x24\x12\x41\x22\x91\xe8\x0b\x90\x4a\xa5\x00\xc0" \
00033 "\x05\x11\x00\xef\x86\x0e\xc0\x4e\x92\xcd\x66\x51" \
00034 "\x28\x16\xc1\x0d\xc3\xb9\xd7\x34\x4d\x30\x0e\x04" \
00035 "\x02\x08\x87\xc3\xd8\x8d\xc5\x90\xcf\xe7\x5d\x77" \
00036 "\x22\xe0\x5d\x77\x92\xdc\x15\x0a\xd8\xdb\x3f\x80" \
00037 "\x05\x19\x80\xdd\xe2\x51\x65\xcc\x59\xdb\x92\x40" \
00038 "\x9f\x1c\x17\xe7\x67\x88\xac\x6f\x08\x70\x01\x60" \
00039 "\x70\xd3\x49\xf2\x56\xad\xa2\x66\x0e\xa1\xda\x68" \
00040 "\x3a\x96\x44\x4d\xc1\x64\x66\x42\x41\xb3\xa9\x39" \
00041 "\xe9\x7d\x01\xf5\x5a\xc3\x95\xe4\xb9\xa6\xe3\xa9" \
00042 "\xda\x10\x0a\x3b\x65\x91\xe4\xaa\xf1\x05\x78\x93" \
00043 "\xd4\x34\x8e\xd7\x3a\xf7\x05\x8c\x8f\x70\x57\xcd" \
00044 "\x8f\x00\xad\x24\x2f\x2f\xd3\x78\x78\x1c\xf7\x05" \
00045 "\x28\x34\xe2\xaa\xf9\x11\x00\x00\x64\x59\x86\x04" \
00046 "\x0b\xf2\x30\x40\x64\x8f\x96\x2c\xef\x88\xbb\x7c" \
00047 "\x07\x7e\x80\x72\xa9\xd8\x7e\x99\x32\x86\xd9\x49" \
00048 "\x0e\x89\x24\x10\x01\x16\x01\xd2\xf0\xa8\x00\x98" \
00049 "\x9b\xfa\x44\x45\x51\xbe\x07\xec\x6c\x6f\xe2\x3a" \
00050 "\x9d\x73\xf6\xc1\xd0\x3c\xee\x6f\x2f\x61\x7e\xb4" \
00051 "\x7b\x6b\xe8\xe2\x20\x2b\x8a\x82\x60\x68\xe1\x7b" \
00052 "\xc0\x56\x34\x2e\xdd\x64\xae\xe8\x3a\x9d\x43\xb9" \
00053 "\x54\xc4\xca\xea\x1a\x16\x97\x96\xbb\x16\x76\x53" \
00054 "\x67\xfa\x96\xba\xb6\xaf\x05\x19\x44\x3b\xdb\x9b" \
00055 "\xd8\x8a\xc6\x1d\xdf\x9e\xf3\xb9\xc9\x5c\x0d\xf4" \
00056 "\x6d\x77\x9a\xff\xeb\x6f\xe8\x0b\xcf\x00\xeb\xc3" \
00057 "\xaf\xdc\xc1\x53\x00\x00\x00\x00\x49\x45\x4e\x44" \
00058 "\xae\x42\x60\x82"
00059 inputOutput1_data = \
00060 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
00061 "\x49\x48\x44\x52\x00\x00\x00\x18\x00\x00\x00\x18" \
00062 "\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\x00\x00\x01" \
00063 "\xf6\x49\x44\x41\x54\x78\x9c\xed\x95\x4d\x6b\x13" \
00064 "\x51\x14\x86\x9f\x49\xe6\x23\xb6\xd3\x52\x2d\x22" \
00065 "\x48\xd1\x2e\x2a\x1a\x6d\xbb\x51\x4a\x68\xc6\x4d" \
00066 "\x55\x1a\x84\x82\x82\x0e\xf4\x47\x44\xc1\x85\x1b" \
00067 "\x45\xfc\x05\x82\xe6\x47\x14\x24\xe0\x88\xad\xcc" \
00068 "\x20\xe9\x46\xa9\xd5\x5a\x37\xc6\x84\xd0\x41\x2d" \
00069 "\x28\x58\x41\x5c\xa8\x88\x4e\xcc\xb8\x98\x66\xe8" \
00070 "\x35\x93\xea\xa4\xdd\x08\xbe\xab\x7b\x0f\x87\xf7" \
00071 "\x39\xef\x7c\xdc\x0b\xff\xba\xa4\xdf\x0b\x8e\x6d" \
00072 "\xf9\x1b\xf7\x93\xb9\x33\x2d\x3d\x71\x24\xb7\x00" \
00073 "\x6a\x7e\x54\x5f\xc7\x12\xa6\x73\x6c\xcb\x77\x6a" \
00074 "\x3e\x17\xa6\x4f\x01\x70\x6b\xe6\x01\x93\x07\xe3" \
00075 "\x07\xd8\x98\x3a\x4c\xe0\xd8\x96\x3f\x3b\x57\x42" \
00076 "\x19\x9a\x10\x9a\x67\xe7\x4a\xb1\x01\x8e\x6d\xf9" \
00077 "\x4d\x88\xdc\x2c\xac\xac\xbc\xc6\xc8\x66\x78\xb2" \
00078 "\x06\x5e\xbd\x11\x36\x9f\x37\xcf\x85\xeb\x1d\xdd" \
00079 "\xbb\xfe\x68\xfe\xec\xe9\x82\x30\x54\x00\xa8\xf9" \
00080 "\xc0\x20\xaf\xd6\x60\xf4\xc0\x00\x1f\x3f\x7f\x07" \
00081 "\x82\xb5\xf5\xfc\x6d\xd8\xec\xb9\xc5\x4d\xcd\x0f" \
00082 "\xa5\x8f\x30\x96\xc9\x52\x79\x59\x16\x01\x00\x47" \
00083 "\xd3\xfb\xc9\x65\x0e\xe3\x35\x7c\xbe\x7c\xab\x03" \
00084 "\x90\x1b\x1f\x66\xca\x18\xc1\x5e\xac\xb0\x5c\x5d" \
00085 "\x25\x7d\xe2\x6a\x5b\xf3\xbd\xfd\x2a\xa5\xdb\xd7" \
00086 "\x18\xcb\x64\x85\xba\x0c\x70\xe3\xe2\x59\xe9\xd2" \
00087 "\xcd\x3b\x7e\x42\x82\xd3\xe3\xc3\xe1\x9b\x4f\x29" \
00088 "\x49\xee\x2f\x94\x59\xae\xae\x82\x7c\x0c\xf7\xdd" \
00089 "\x8f\x4d\x13\x44\x29\x4c\xe0\xb9\xf3\x2c\x31\x41" \
00090 "\x32\x21\x31\x65\x8c\x00\x70\xef\xd1\x0b\x96\x2a" \
00091 "\x81\x79\xa7\x12\xfe\x83\xe9\xe3\x43\xcc\x3c\x74" \
00092 "\x91\xa4\x20\xc3\x62\xf9\xcd\x96\xcc\x5b\x00\x3d" \
00093 "\xbd\x3a\x9e\x3b\xcf\x63\x82\x4f\x75\x60\x70\x1f" \
00094 "\xf0\xe1\xaf\x8c\x76\xf7\xeb\x54\xd7\x3d\xda\x02" \
00095 "\x54\x25\xd8\x9e\xcc\x8e\xf2\xfe\xd3\xd7\x58\x93" \
00096 "\x76\xa7\x64\xc1\x23\x12\xa0\x69\x2a\x00\x7d\xba" \
00097 "\x46\xbd\xd1\x20\x8e\xfa\x74\x4d\xf0\x88\x06\xa8" \
00098 "\x5a\xd8\x9c\x4c\xc4\x3b\x22\x7a\xba\x54\xc1\x23" \
00099 "\x12\x90\x5a\xa7\xef\xe9\xd5\xd9\xd9\xf5\x33\x16" \
00100 "\x40\x95\x93\x82\x47\x24\x40\x55\x15\x0c\xc3\xe0" \
00101 "\xfa\x95\xcb\xb1\xcc\x9b\x32\x0c\x03\x55\x55\xda" \
00102 "\x03\xee\x5a\x16\xa6\x69\x62\x9a\x66\x47\x00\x80" \
00103 "\x62\x51\x3c\x4e\x84\x07\x9d\xcf\xe7\xb7\xe5\x32" \
00104 "\x28\x14\x0a\x5b\xba\xa4\xfe\x6b\x7b\xf5\x0b\x3d" \
00105 "\xae\x86\xf4\xac\x24\x5e\xd9\x00\x00\x00\x00\x49" \
00106 "\x45\x4e\x44\xae\x42\x60\x82"
00107 inputOutput2_data = \
00108 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
00109 "\x49\x48\x44\x52\x00\x00\x00\x18\x00\x00\x00\x18" \
00110 "\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\x00\x00\x01" \
00111 "\xf7\x49\x44\x41\x54\x78\x9c\xed\x95\x41\x6b\x13" \
00112 "\x41\x18\x86\x9f\xc4\x34\x87\x82\x20\x78\x10\x44" \
00113 "\x68\x8b\x86\xb6\x49\x15\x41\x6c\xb6\x24\xa7\x14" \
00114 "\x9a\x42\x22\x26\xfd\x1f\x4b\xa1\x07\x2f\x82\xf4" \
00115 "\xe2\xc5\x43\xa0\xe4\x47\x08\xd9\x43\x7b\x50\xb0" \
00116 "\x87\x5e\xd2\xb5\x8a\xa6\x0a\xa5\x5a\xa4\x3d\x34" \
00117 "\x12\x0f\x9a\x20\x31\x4d\x93\xee\x66\x93\xf1\x50" \
00118 "\x09\x99\x66\x8d\xdd\xa6\xa0\x07\xdf\xd3\xce\xc7" \
00119 "\xce\xf3\x7c\x33\x30\x33\xf0\x3f\x7f\x3b\xae\xce" \
00120 "\x81\xaa\xaa\xe2\x3c\xa0\xe9\x74\xda\xd5\x55\x54" \
00121 "\x55\x55\x68\x9a\x26\xfa\x8d\xa6\x69\xa2\xb3\x51" \
00122 "\x4f\xa7\xe4\x7e\x22\x41\x26\x93\x41\xd7\xf5\x33" \
00123 "\x75\x1e\x0e\x87\x49\xce\xcd\x91\xcd\x66\xdb\x35" \
00124 "\x49\x60\x9a\x0d\x74\x5d\x67\xf1\xf1\x13\x4c\xab" \
00125 "\xe9\x08\xee\xf5\x5c\x60\xf1\xe1\x03\x62\xf1\x7b" \
00126 "\x52\x5d\x12\x1c\x19\x26\x00\x5f\x2b\x55\x0e\x6a" \
00127 "\xa6\x23\xc1\xc5\x41\xaf\xc4\xb0\x15\x18\xa6\x01" \
00128 "\x40\xb9\x6a\x50\xaa\xd4\x1d\x09\x9a\x2d\x21\x31" \
00129 "\xec\x05\xbf\xec\xe5\xaa\x41\xe9\x87\x33\x81\xc7" \
00130 "\xed\x96\x18\xb6\x02\xb3\x61\x01\x70\x78\x64\x51" \
00131 "\xae\x35\x4e\x0d\x2f\xec\x7f\x66\xfb\x04\xc3\x56" \
00132 "\x70\x50\xa9\x02\x50\x2c\x5d\xa2\xf0\x65\xf0\x74" \
00133 "\x74\x2b\xc7\xd4\xcd\x11\x00\x5e\x11\x69\x33\x6c" \
00134 "\x05\x8e\x63\xe5\x50\x26\x86\x89\x87\x26\x00\x10" \
00135 "\x42\xf0\x74\x7d\xef\x9c\x04\x56\x8e\xbb\xfe\x21" \
00136 "\xa2\x4a\x80\x4a\xfd\x78\x3b\xa3\x4a\x80\x66\x4b" \
00137 "\xf0\x96\x08\x90\xfe\xbd\xe0\xea\x65\x6f\x4f\xf6" \
00138 "\x5e\x7e\x83\x3b\xe3\x43\xcc\x04\xfd\xd4\x1b\x4d" \
00139 "\xaa\xf5\xe3\x7d\x17\xc0\x4c\xd0\x4f\x4b\xc0\xc2" \
00140 "\xd2\xb2\x48\xcd\x27\x5d\x5d\x82\xb1\xf1\x00\x6b" \
00141 "\x99\x47\x3d\x05\x03\x37\x22\x6c\xee\xe4\xd9\xdc" \
00142 "\xc9\x73\xcb\x77\x8d\xb1\xeb\xc3\x00\xe8\xef\xf7" \
00143 "\xd9\xda\x2d\x48\xff\x4a\x82\xdc\x9b\x0d\x26\x95" \
00144 "\x10\x93\x4a\xa8\xa7\xa0\x7e\xf8\xbd\xfd\xbd\xf2" \
00145 "\xae\x40\xe8\xf6\x28\x00\x5b\xbb\x05\x82\x57\x6a" \
00146 "\x14\x8b\xdf\xf0\xf9\x46\x48\x75\x0a\xe2\xb1\x69" \
00147 "\x9e\x3d\x5f\xe3\xe3\x87\xed\x2e\xe0\x9f\x56\x33" \
00148 "\xe0\x71\xb7\xc7\xfa\xcb\xd7\xc4\x63\xd3\x44\x67" \
00149 "\x13\x2e\x69\x05\xd1\xd9\x84\x6b\xf5\xc5\x8a\xe3" \
00150 "\xeb\x7a\xf5\x93\x3c\xa5\x13\x0e\x27\xde\x83\xb3" \
00151 "\x64\x61\x69\x59\x32\xa4\xe6\x93\x12\xb3\xbf\x73" \
00152 "\x00\x44\x47\xe5\x1e\x53\xfd\x02\xff\xb9\xfc\x04" \
00153 "\xd0\xa7\x00\x36\x08\xec\x11\x60\x00\x00\x00\x00" \
00154 "\x49\x45\x4e\x44\xae\x42\x60\x82"
00155 visible_data = \
00156 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
00157 "\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10" \
00158 "\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\x00\x00\x00" \
00159 "\x96\x49\x44\x41\x54\x78\x9c\x63\x60\x18\x68\xc0" \
00160 "\x88\xcc\x39\xbd\x21\xe8\x3f\x21\x0d\xa6\x01\xeb" \
00161 "\x50\xf4\xc0\x39\xa7\x37\x04\xfd\xe7\x17\x90\x63" \
00162 "\x10\x16\x51\xc2\xa9\xf9\xed\x9b\x7b\x0c\x1f\x3f" \
00163 "\x3c\x42\x31\x84\x05\x59\x01\x4c\x33\x4c\x21\x0c" \
00164 "\xc0\x0c\x16\x16\x51\x42\x11\xc7\x30\x00\x06\x3e" \
00165 "\x7e\x78\xc4\xf0\x86\x35\xb2\x11\x2e\xf0\x61\x79" \
00166 "\x3d\x2e\x97\x61\x35\x80\x81\x81\x81\xc1\xd3\x3b" \
00167 "\xb4\x01\xc6\x3e\xbd\x21\xa8\x1e\x97\x3a\xac\x06" \
00168 "\xf0\x0b\xc8\xa1\x04\x28\xbf\x80\x1c\x2e\xfd\xd8" \
00169 "\x0d\x80\xf9\x97\x18\xc0\x44\x94\xaa\xe1\x6d\x00" \
00170 "\x4a\x20\xde\xbb\x73\x80\x7c\x03\x50\x12\x0e\x41" \
00171 "\xb0\x8e\x64\x8b\x70\x02\x00\x78\x5f\x2a\xe9\x56" \
00172 "\xf2\x43\xfc\x00\x00\x00\x00\x49\x45\x4e\x44\xae" \
00173 "\x42\x60\x82"
00174 invisible_data = \
00175 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
00176 "\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10" \
00177 "\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\x00\x00\x00" \
00178 "\x97\x49\x44\x41\x54\x78\x9c\x63\x60\x18\x68\xc0" \
00179 "\x88\xcc\x79\x75\xa9\xf6\x3f\x21\x0d\x62\x7a\xcd" \
00180 "\x28\x7a\xe0\x9c\x57\x97\x6a\xff\xb3\x70\x2a\x30" \
00181 "\xb0\xf1\xe9\xe1\xd4\xfc\xeb\xd3\x25\x86\x3f\xdf" \
00182 "\x1f\xa0\x18\xc2\x82\xac\x00\xa6\x19\xa6\x10\xae" \
00183 "\x08\x6a\x30\x1b\x9f\x1e\x8a\x38\x86\x01\x30\xf0" \
00184 "\xe7\xfb\x03\x86\xd7\x8c\x3e\x8d\x30\xbe\xe8\xf7" \
00185 "\x2d\xf5\xb8\x5c\x86\xd5\x00\x06\x06\x06\x06\x6d" \
00186 "\x5d\xf3\x06\x18\xfb\xd5\xa5\xda\x7a\x5c\xea\xb0" \
00187 "\x1a\xc0\xc2\xa9\x80\x12\xa0\x2c\x9c\x0a\xb8\xf4" \
00188 "\x63\x37\x00\xe6\x5f\x62\x00\x13\x51\xaa\x86\xb7" \
00189 "\x01\x28\x81\xf8\xed\xe5\x26\xf2\x0d\x40\x4e\x38" \
00190 "\x84\x41\x33\xc9\x16\xe1\x04\x00\x9f\x05\x2b\x35" \
00191 "\x07\xd6\xdf\x91\x00\x00\x00\x00\x49\x45\x4e\x44" \
00192 "\xae\x42\x60\x82"
00193 class Input_output(QDialog):
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206 def __init__(self, parent = None, callback = None):
00207 QDialog.__init__(self,parent,"Input/Output",0,0)
00208
00209 self.setMinimumSize(QSize(200,0))
00210 self.setFocusPolicy(QDialog.TabFocus)
00211 self.setModal(0)
00212
00213
00214 self.image0 = QPixmap()
00215 self.image0.loadFromData(inputOutput0_data,"PNG")
00216 self.image1 = QPixmap()
00217 self.image1.loadFromData(inputOutput1_data,"PNG")
00218 self.image2 = QPixmap()
00219 self.image2.loadFromData(inputOutput2_data,"PNG")
00220 self.visible = QPixmap()
00221 self.visible.loadFromData(visible_data,"PNG")
00222 self.invisible = QPixmap()
00223 self.invisible.loadFromData(invisible_data,"PNG")
00224
00225 self.setMinimumSize(QSize(200,0))
00226 self.setIcon(self.image0)
00227 self.setFocusPolicy(QDialog.TabFocus)
00228
00229 Input_outputLayout = QGridLayout(self,1,1,2,6,"Input_outputLayout")
00230
00231 self.splitter15 = QSplitter(self,"splitter15")
00232 self.splitter15.setOrientation(QSplitter.Vertical)
00233 self.splitter15.setOpaqueResize(1)
00234 self.splitter15.setChildrenCollapsible(1)
00235
00236 LayoutWidget = QWidget(self.splitter15,"layout13")
00237 layout13 = QVBoxLayout(LayoutWidget,11,6,"layout13")
00238 spacer2 = QSpacerItem(20,3,QSizePolicy.Minimum,QSizePolicy.Fixed)
00239 layout13.addItem(spacer2)
00240
00241 layout12 = QHBoxLayout(None,0,6,"layout12")
00242
00243 self.textLabel6 = QLabel(LayoutWidget,"textLabel6")
00244 self.textLabel6.setMinimumSize(QSize(0,0))
00245 self.textLabel6.setAlignment(QLabel.WordBreak | QLabel.AlignVCenter)
00246 layout12.addWidget(self.textLabel6)
00247 spacer4 = QSpacerItem(0,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
00248 layout12.addItem(spacer4)
00249
00250 self.textLabel8 = QLabel(LayoutWidget,"textLabel8")
00251 self.textLabel8.setMinimumSize(QSize(20,0))
00252 self.textLabel8.setPixmap(self.image1)
00253 layout12.addWidget(self.textLabel8)
00254 layout13.addLayout(layout12)
00255
00256 self.inputDevices = QListView(LayoutWidget,"Input")
00257 self.inputDevices.addColumn("Intput devices")
00258 self.inputDevices.setMinimumSize(QSize(0,20))
00259 layout13.addWidget(self.inputDevices)
00260
00261 LayoutWidget_2 = QWidget(self.splitter15,"layout17")
00262 layout17 = QVBoxLayout(LayoutWidget_2,11,6,"layout17")
00263 spacer7 = QSpacerItem(20,3,QSizePolicy.Minimum,QSizePolicy.Fixed)
00264 layout17.addItem(spacer7)
00265
00266 layout16 = QHBoxLayout(None,0,6,"layout16")
00267
00268 self.textLabel9 = QLabel(LayoutWidget_2,"textLabel9")
00269 layout16.addWidget(self.textLabel9)
00270 spacer8 = QSpacerItem(41,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
00271 layout16.addItem(spacer8)
00272
00273 self.textLabel10 = QLabel(LayoutWidget_2,"textLabel10")
00274 self.textLabel10.setMinimumSize(QSize(20,0))
00275 self.textLabel10.setPixmap(self.image2)
00276 layout16.addWidget(self.textLabel10)
00277 layout17.addLayout(layout16)
00278
00279 self.outputDevices = QListView(LayoutWidget_2,"outputDevices")
00280 self.outputDevices.addColumn("Output devices")
00281 self.outputDevices.setMinimumSize(QSize(0,20))
00282 layout17.addWidget(self.outputDevices)
00283
00284 Input_outputLayout.addWidget(self.splitter15,0,0)
00285
00286 self.resize(QSize(200,376).expandedTo(self.minimumSizeHint()))
00287 self.clearWState(Qt.WState_Polished)
00288
00289 self.setCaption(self.__tr("Input / Output devices"))
00290 self.textLabel6.setText(self.__tr("Input devices"))
00291 self.textLabel9.setText(self.__tr("Output devices"))
00292
00293 self.connect(self.inputDevices,SIGNAL("doubleClicked(QListViewItem*)"),self.OnInputChoice)
00294 self.connect(self.outputDevices,SIGNAL("doubleClicked(QListViewItem*)"),self.OnOutputChoice)
00295 self.visWindow = callback
00296 self.inputLinks = []
00297 self.outputLinks = []
00298 self.origShape = None
00299
00300
00301 def insertInput(self,item,index):
00302 if self.inputDevices.lastItem() and item==self.inputDevices.lastItem().text(0):
00303 elt = QListViewItem(self.inputDevices.lastItem(),item,str(index))
00304 else:
00305 elt = QListViewItem(self.inputDevices,item,str(index))
00306 elt.setPixmap(0,self.invisible)
00307
00308
00309 def insertOutput(self,item,index):
00310 elt = QListViewItem(self.outputDevices,item,str(index))
00311 elt.setPixmap(0,self.invisible)
00312
00313
00314 def clear(self):
00315 self.outputDevices.clear()
00316 self.inputDevices.clear()
00317 self.inputLinks = []
00318 self.outputLinks = []
00319
00320 def setData(self,input,output,origShape):
00321 self.inputLinks = input
00322 self.outputLinks = output
00323 self.origShape = origShape
00324
00325 def OnInputChoice(self,item):
00326 index = int(str(item.text(1)))
00327 link = self.inputLinks[index]
00328
00329
00330
00331
00332 deviceobj = self.origShape.GetObject()
00333
00334 tmp_link = link.GetObjectInfo(True)
00335 if self.visWindow.FindByName(tmp_link[DEV_SWITCH_FROM]):
00336 print "element deja present "
00337 return
00338 tmp_devobj = Device(self.visWindow.main.GetActiveSystem(),tmp_link[DEV_SWITCH_FROM],False)
00339
00340 index,portnr = self.origShape.FindCorrespondingPortIndex(link.GetPortTo(),link.GetPortTypeTo(),port_IN)
00341 port_pos = self.origShape.GetPortPosition(index,port_IN)
00342 newshape,newNodes = self.visWindow.AddNode(tmp_devobj,index,30,True)
00343 self.visWindow.CreateConnectedLink(link)
00344
00345 self.visWindow.canvas.update()
00346
00347 def OnOutputChoice(self,item):
00348 index = int(str(item.text(1)))
00349 link = self.outputLinks[index]
00350
00351
00352 deviceobj = self.origShape.GetObject()
00353
00354 tmp_link = link.GetObjectInfo(True)
00355 if self.visWindow.FindByName(tmp_link[DEV_SWITCH_TO]):
00356 print "element deja present "
00357 return
00358 tmp_devobj = Device(self.visWindow.main.GetActiveSystem(),tmp_link[DEV_SWITCH_TO],False)
00359
00360 index,portnr = self.origShape.FindCorrespondingPortIndex(link.GetPortTo(),link.GetPortTypeTo(),port_OUT)
00361 port_pos = self.origShape.GetPortPosition(index,port_OUT)
00362 newshape,newNodes = self.visWindow.AddNode(tmp_devobj,index,30,False)
00363 self.visWindow.CreateConnectedLink(link)
00364
00365 self.visWindow.canvas.update()
00366
00367
00368 def __tr(self,s,c = None):
00369 return qApp.translate("Input_output",s,c)
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489