1   
  2   
  3   
  4   
  5   
  6   
  7   
  8   
  9   
 10   
 11   
 12   
 13   
 14   
 15   
 16   
 17   
 18   
 19   
 20   
 21   
 22   
 23   
 24   
 25  """Collection of all the image and icon paths. 
 26   
 27  This module allows for easy replacement of images and icons throughout the GUI. 
 28  """ 
 29   
 30   
 31  from os import sep 
 32  import sys 
 33   
 34   
 35  from status import Status; status = Status() 
 36   
 37   
 38   
 39  ANALYSIS_IMAGE_PATH = status.install_path + sep + 'graphics' + sep + 'analyses' + sep 
 40  OXY_ICON_PATH = status.install_path + sep + 'graphics' + sep + 'oxygen_icons' + sep 
 41  IMAGE_PATH = status.install_path + sep + 'gui' + sep + 'images' + sep 
 42  ICON_RELAX_PATH = status.install_path + sep + 'graphics' + sep + 'relax_icons' + sep 
 43  WIZARD_IMAGE_PATH = status.install_path + sep + 'graphics' + sep + 'wizards' + sep 
 44   
 45   
 46   
 48      """The 16x16 pixel icons.""" 
 49   
 51          """Initialise all paths.""" 
 52   
 53           
 54          path = ICON_RELAX_PATH + '16x16' + sep 
 55          self.about_relax =              IMAGE_PATH + 'relax_16x16.png' 
 56          self.about_relaxgui =           IMAGE_PATH + 'relax_16x16.png' 
 57          self.bmrb =                     path + 'bmrb.png' 
 58          self.bruker =                   path + 'bruker.png' 
 59          self.gnu_head =                 path + 'gnu-head-mini.png' 
 60          self.grace =                    path + 'grace_icon.png' 
 61          self.molecule =                 path + 'molecule.png' 
 62          self.molecule_grey =            path + 'molecule_grey.png' 
 63          self.molecule_unfolded =        path + 'molecule_unfolded.png' 
 64          self.molecule_unfolded_grey =   path + 'molecule_unfolded_grey.png' 
 65          self.molmol =                   path + 'molmol.png' 
 66          self.pipe =                     path + 'pipe.png' 
 67          self.pipe_hybrid =              path + 'pipe_hybrid.png' 
 68          self.pymol =                    path + 'pymol_icon.png' 
 69          self.relax_data =               path + 'fid.png' 
 70          self.residue =                  path + 'residue.png' 
 71          self.residue_grey =             path + 'residue_grey.png' 
 72          self.sequence =                 path + 'sequence.png' 
 73          self.spin =                     path + 'spin.png' 
 74          self.spin_grey =                path + 'spin_grey.png' 
 75          self.structure =                path + 'structure.png' 
 76          self.value =                    path + 'value.png' 
 77   
 78           
 79          path = OXY_ICON_PATH + '16x16' + sep 
 80          self.about =                            path + 'actions'    + sep + 'help-about.png' 
 81          self.add =                              path + 'actions'    + sep + 'list-add-relax-blue.png' 
 82          self.contact =                          path + 'actions'    + sep + 'mail-mark-unread-new.png' 
 83          self.copy =                             path + 'actions'    + sep + 'list-add.png' 
 84          self.dialog_cancel =                    path + 'actions'    + sep + 'dialog-cancel.png' 
 85          self.dialog_ok =                        path + 'actions'    + sep + 'dialog-ok.png' 
 86          self.dialog_ok_apply =                  path + 'actions'    + sep + 'dialog-ok-apply.png' 
 87          self.dialog_close =                     path + 'actions'    + sep + 'dialog-close.png' 
 88          self.dialog_warning =                   path + 'status'     + sep + 'dialog-warning.png' 
 89          self.dialog_warning_relax =             path + 'status'     + sep + 'dialog-warning-relax-blue.png' 
 90          self.document_close =                   path + 'actions'    + sep + 'document-close.png' 
 91          self.document_open =                    path + 'actions'    + sep + 'document-open.png' 
 92          self.document_open_folder =             path + 'actions'    + sep + 'document-open-folder.png' 
 93          self.document_preview =                 path + 'actions'    + sep + 'document-preview.png' 
 94          self.document_properties =              path + 'actions'    + sep + 'document-properties.png' 
 95          self.document_save =                    path + 'actions'    + sep + 'document-save.png' 
 96          self.document_save_as =                 path + 'actions'    + sep + 'document-save-as.png' 
 97          self.edit_copy =                        path + 'actions'    + sep + 'edit-copy.png' 
 98          self.edit_delete =                      path + 'actions'    + sep + 'edit-delete.png' 
 99          self.edit_find =                        path + 'actions'    + sep + 'edit-find.png' 
100          self.edit_rename =                      path + 'actions'    + sep + 'edit-rename.png' 
101          self.edit_select_all =                  path + 'actions'    + sep + 'edit-select-all.png' 
102          self.exit =                             path + 'actions'    + sep + 'system-shutdown.png' 
103          self.flag_blue =                        path + 'actions'    + sep + 'flag-blue.png' 
104          self.flag_red =                         path + 'actions'    + sep + 'flag-red.png' 
105          self.go_bottom =                        path + 'actions'    + sep + 'go-bottom.png' 
106          self.go_top =                           path + 'actions'    + sep + 'go-top.png' 
107          self.help_about =                       path + 'actions'    + sep + 'help-about.png' 
108          self.list_remove =                      path + 'actions'    + sep + 'list-remove.png' 
109          self.load =                             path + 'actions'    + sep + 'arrow-right.png' 
110          self.manual =                           path + 'mimetypes'  + sep + 'application-pdf.png' 
111          self.new =                              path + 'actions'    + sep + 'document-new.png' 
112          self.open =                             path + 'actions'    + sep + 'document-open.png' 
113          self.open_folder =                      path + 'actions'    + sep + 'document-open-folder.png' 
114          self.pipe_switch =                      path + 'actions'    + sep + 'system-switch-user.png' 
115          self.preferences_system_performance =   path + 'apps'       + sep + 'preferences-system-performance.png' 
116          self.relax_prompt =                     path + 'mimetypes'  + sep + 'application-x-executable-script.png' 
117          self.remove =                           path + 'actions'    + sep + 'list-remove.png' 
118          self.save =                             path + 'actions'    + sep + 'document-save.png' 
119          self.save_as =                          path + 'actions'    + sep + 'document-save-as.png' 
120          self.settings_global =                  path + 'categories' + sep + 'preferences-system.png' 
121          self.skip =                             path + 'actions'    + sep + 'arrow-right-double-relax-blue.png' 
122          self.system_run =                       path + 'actions'    + sep + 'system-run.png' 
123          self.ref =                              path + 'actions'    + sep + 'flag-blue.png' 
124          self.uf_script =                        path + 'mimetypes'  + sep + 'application-x-desktop.png' 
125          self.view_refresh =                     path + 'actions'    + sep + 'view-refresh.png' 
126          self.view_statistics =                  path + 'actions'    + sep + 'view-statistics.png' 
127          self.user_busy =                        path + 'status'     + sep + 'user-busy.png' 
128          self.zoom_in =                          path + 'actions'    + sep + 'zoom-in.png' 
129          self.zoom_original =                    path + 'actions'    + sep + 'zoom-original.png' 
130          self.zoom_out =                         path + 'actions'    + sep + 'zoom-out.png' 
  131   
132   
133   
135      """The 22x22 pixel icons.""" 
136   
138          """Initialise all paths.""" 
139   
140           
141          path = OXY_ICON_PATH + '22x22' + sep 
142          self.about =                path + 'actions'    + sep + 'help-about.png' 
143          self.add =                  path + 'actions'    + sep + 'list-add-relax-blue.png' 
144          self.copy =                 path + 'actions'    + sep + 'list-add.png' 
145          self.dialog_cancel =        path + 'actions'    + sep + 'dialog-cancel.png' 
146          self.dialog_close =         path + 'actions'    + sep + 'dialog-close.png' 
147          self.dialog_ok =            path + 'actions'    + sep + 'dialog-ok.png' 
148          self.dialog_ok_apply =      path + 'actions'    + sep + 'dialog-ok-apply.png' 
149          self.dialog_warning =       path + 'status'     + sep + 'dialog-warning.png' 
150          self.dialog_warning_relax = path + 'status'     + sep + 'dialog-warning-relax-blue.png' 
151          self.document_open =        path + 'actions'    + sep + 'document-open.png' 
152          self.document_open_folder = path + 'actions'    + sep + 'document-open-folder.png' 
153          self.document_preview =     path + 'actions'    + sep + 'document-preview.png' 
154          self.edit_copy =            path + 'actions'    + sep + 'edit-copy.png' 
155          self.edit_delete =          path + 'actions'    + sep + 'edit-delete.png' 
156          self.edit_find =            path + 'actions'    + sep + 'edit-find.png' 
157          self.edit_rename =          path + 'actions'    + sep + 'edit-rename.png' 
158          self.edit_select_all =      path + 'actions'    + sep + 'edit-select-all.png' 
159          self.document_close =       path + 'actions'    + sep + 'document-close.png' 
160          self.document_properties =  path + 'actions'    + sep + 'document-properties.png' 
161          self.document_save =        path + 'actions'    + sep + 'document-save.png' 
162          self.document_save_as =     path + 'actions'    + sep + 'document-save-as.png' 
163          self.go_bottom =            path + 'actions'    + sep + 'go-bottom.png' 
164          self.go_previous_view =     path + 'actions'    + sep + 'go-previous-view.png' 
165          self.go_next_view =         path + 'actions'    + sep + 'go-next-view.png' 
166          self.go_top =               path + 'actions'    + sep + 'go-top.png' 
167          self.help_about =           path + 'actions'    + sep + 'help-about.png' 
168          self.list_remove =          path + 'actions'    + sep + 'list-remove.png' 
169          self.new =                  path + 'actions'    + sep + 'document-new.png' 
170          self.open_folder =          path + 'actions'    + sep + 'document-open-folder.png' 
171          self.pipe_switch =          path + 'actions'    + sep + 'system-switch-user.png' 
172          self.preferences_system_performance =   path + 'apps'       + sep + 'preferences-system-performance.png' 
173          self.save =                 path + 'actions'    + sep + 'document-save.png' 
174          self.skip =                 path + 'actions'    + sep + 'arrow-right-double-relax-blue.png' 
175          self.system_run =           path + 'actions'    + sep + 'system-run.png' 
176          self.view_refresh =         path + 'actions'    + sep + 'view-refresh.png' 
177          self.view_statistics =      path + 'actions'    + sep + 'view-statistics.png' 
178          self.user_busy =            path + 'status'     + sep + 'user-busy.png' 
179          self.zoom_in =              path + 'actions'    + sep + 'zoom-in.png' 
180          self.zoom_original =        path + 'actions'    + sep + 'zoom-original.png' 
181          self.zoom_out =             path + 'actions'    + sep + 'zoom-out.png' 
182          self.relax_prompt =         path + 'mimetypes'  + sep + 'application-x-executable-script.png' 
183   
184           
185          path = ICON_RELAX_PATH + '22x22' + sep 
186          self.bmrb =                     path + 'bmrb.png' 
187          self.bruker =                   path + 'bruker.png' 
188          self.bruker_add =               path + 'bruker_add.png' 
189          self.molecule =                 path + 'molecule.png' 
190          self.molecule_grey =            path + 'molecule_grey.png' 
191          self.molecule_unfolded =        path + 'molecule_unfolded.png' 
192          self.molecule_unfolded_grey =   path + 'molecule_unfolded_grey.png' 
193          self.pipe =                     path + 'pipe.png' 
194          self.pipe_hybrid =              path + 'pipe_hybrid.png' 
195          self.relax_data =               path + 'fid.png' 
196          self.residue =                  path + 'residue.png' 
197          self.residue_grey =             path + 'residue_grey.png' 
198          self.sequence =                 path + 'sequence.png' 
199          self.spin =                     path + 'spin.png' 
200          self.spin_grey =                path + 'spin_grey.png' 
201          self.structure =                path + 'structure.png' 
202          self.value =                    path + 'value.png' 
  203   
204   
205   
207      """The 32x32 pixel icons.""" 
208   
210          """Initialise all paths.""" 
211   
212           
213          path = OXY_ICON_PATH + '32x32' + sep 
214          self.about =                            path + 'actions'    + sep + 'help-about.png' 
215          self.add =                              path + 'actions'    + sep + 'list-add-relax-blue.png' 
216          self.dialog_cancel =                    path + 'actions'    + sep + 'dialog-cancel.png' 
217          self.dialog_close =                     path + 'actions'    + sep + 'dialog-close.png' 
218          self.dialog_ok =                        path + 'actions'    + sep + 'dialog-ok.png' 
219          self.dialog_ok_apply =                  path + 'actions'    + sep + 'dialog-ok-apply.png' 
220          self.dialog_warning =                   path + 'status'     + sep + 'dialog-warning.png' 
221          self.dialog_warning_relax =             path + 'status'     + sep + 'dialog-warning-relax-blue.png' 
222          self.document_close =                   path + 'actions'    + sep + 'document-close.png' 
223          self.document_open =                    path + 'actions'    + sep + 'document-open.png' 
224          self.document_open_folder =             path + 'actions'    + sep + 'document-open-folder.png' 
225          self.document_preview =                 path + 'actions'    + sep + 'document-preview.png' 
226          self.document_properties =              path + 'actions'    + sep + 'document-properties.png' 
227          self.document_save =                    path + 'actions'    + sep + 'document-save.png' 
228          self.document_save_as =                 path + 'actions'    + sep + 'document-save-as.png' 
229          self.copy =                             path + 'actions'    + sep + 'list-add.png' 
230          self.edit_copy =                        path + 'actions'    + sep + 'edit-copy.png' 
231          self.edit_delete =                      path + 'actions'    + sep + 'edit-delete.png' 
232          self.edit_find =                        path + 'actions'    + sep + 'edit-find.png' 
233          self.edit_rename =                      path + 'actions'    + sep + 'edit-rename.png' 
234          self.edit_select_all =                  path + 'actions'    + sep + 'edit-select-all.png' 
235          self.go_bottom =                        path + 'actions'    + sep + 'go-bottom.png' 
236          self.go_top =                           path + 'actions'    + sep + 'go-top.png' 
237          self.help_about =                       path + 'actions'    + sep + 'help-about.png' 
238          self.list_remove =                      path + 'actions'    + sep + 'list-remove.png' 
239          self.new =                              path + 'actions'    + sep + 'document-new.png' 
240          self.open_folder =                      path + 'actions'    + sep + 'document-open-folder.png' 
241          self.pipe_switch =                      path + 'actions'    + sep + 'system-switch-user.png' 
242          self.preferences_system_performance =   path + 'apps'       + sep + 'preferences-system-performance.png' 
243          self.save =                             path + 'actions'    + sep + 'document-save.png' 
244          self.skip =                             path + 'actions'    + sep + 'arrow-right-double-relax-blue.png' 
245          self.system_run =                       path + 'actions'    + sep + 'system-run.png' 
246          self.view_refresh =                     path + 'actions'    + sep + 'view-refresh.png' 
247          self.view_statistics =                  path + 'actions'    + sep + 'view-statistics.png' 
248          self.user_busy =                        path + 'status'     + sep + 'user-busy.png' 
249          self.zoom_in =                          path + 'actions'    + sep + 'zoom-in.png' 
250          self.zoom_original =                    path + 'actions'    + sep + 'zoom-original.png' 
251          self.zoom_out =                         path + 'actions'    + sep + 'zoom-out.png' 
252   
253           
254          path = ICON_RELAX_PATH + '32x32' + sep 
255          self.bmrb =                     path + 'bmrb.png' 
256          self.bruker =                   path + 'bruker.png' 
257          self.pipe_hybrid =              path + 'pipe_hybrid.png' 
258          self.spin =                     path + 'spin.png' 
259          self.spin_grey =                path + 'spin_grey.png' 
260          self.structure =                path + 'structure.png' 
  261   
262   
264      """The 48x48 pixel icons.""" 
265   
267          """Initialise all paths.""" 
268   
269           
270          path = OXY_ICON_PATH + '48x48' + sep 
271          self.about =                            path + 'actions'    + sep + 'help-about.png' 
272          self.add =                              path + 'actions'    + sep + 'list-add-relax-blue.png' 
273          self.backwards =                        path + 'actions'    + sep + 'go-previous-view.png' 
274          self.copy =                             path + 'actions'    + sep + 'list-add.png' 
275          self.dialog_cancel =                    path + 'actions'    + sep + 'dialog-cancel.png' 
276          self.dialog_close =                     path + 'actions'    + sep + 'dialog-close.png' 
277          self.dialog_ok =                        path + 'actions'    + sep + 'dialog-ok.png' 
278          self.dialog_ok_apply =                  path + 'actions'    + sep + 'dialog-ok-apply.png' 
279          self.dialog_warning =                   path + 'status'     + sep + 'dialog-warning.png' 
280          self.dialog_warning_relax =             path + 'status'     + sep + 'dialog-warning-relax-blue.png' 
281          self.document_close =                   path + 'actions'    + sep + 'document-close.png' 
282          self.document_open =                    path + 'actions'    + sep + 'document-open.png' 
283          self.document_open_folder =             path + 'actions'    + sep + 'document-open-folder.png' 
284          self.document_preview =                 path + 'actions'    + sep + 'document-preview.png' 
285          self.document_properties =              path + 'actions'    + sep + 'document-properties.png' 
286          self.document_save =                    path + 'actions'    + sep + 'document-save.png' 
287          self.document_save_as =                 path + 'actions'    + sep + 'document-save-as.png' 
288          self.edit_copy =                        path + 'actions'    + sep + 'edit-copy.png' 
289          self.edit_delete =                      path + 'actions'    + sep + 'edit-delete.png' 
290          self.edit_find =                        path + 'actions'    + sep + 'edit-find.png' 
291          self.edit_rename =                      path + 'actions'    + sep + 'edit-rename.png' 
292          self.edit_select_all =                  path + 'actions'    + sep + 'edit-select-all.png' 
293          self.forwards =                         path + 'actions'    + sep + 'go-next-view.png' 
294          self.go_bottom =                        path + 'actions'    + sep + 'go-bottom.png' 
295          self.go_top =                           path + 'actions'    + sep + 'go-top.png' 
296          self.help_about =                       path + 'actions'    + sep + 'help-about.png' 
297          self.list_remove =                      path + 'actions'    + sep + 'list-remove.png' 
298          self.new =                              path + 'actions'    + sep + 'document-new.png' 
299          self.open_folder =                      path + 'actions'    + sep + 'document-open-folder.png' 
300          self.pipe_switch =                      path + 'actions'    + sep + 'system-switch-user.png' 
301          self.preferences_system_performance =   path + 'apps'       + sep + 'preferences-system-performance.png' 
302          self.remove =                           path + 'actions'    + sep + 'list-remove.png' 
303          self.save =                             path + 'actions'    + sep + 'document-save.png' 
304          self.skip =                             path + 'actions'    + sep + 'arrow-right-double-relax-blue.png' 
305          self.system_run =                       path + 'actions'    + sep + 'system-run.png' 
306          self.view_refresh =                     path + 'actions'    + sep + 'view-refresh.png' 
307          self.view_statistics =                  path + 'actions'    + sep + 'view-statistics.png' 
308          self.user_busy =                        path + 'status'     + sep + 'user-busy.png' 
309          self.zoom_in =                          path + 'actions'    + sep + 'zoom-in.png' 
310          self.zoom_original =                    path + 'actions'    + sep + 'zoom-original.png' 
311          self.zoom_out =                         path + 'actions'    + sep + 'zoom-out.png' 
312   
313           
314          path = ICON_RELAX_PATH + '48x48' + sep 
315          self.bmrb =                     path + 'bmrb.png' 
316          self.bruker =                   path + 'bruker.png' 
317          self.pipe =                     path + 'pipe.png' 
318          self.pipe_hybrid =              path + 'pipe_hybrid.png' 
319          self.relax_data =               path + 'fid.png' 
320          self.sequence =                 path + 'sequence.png' 
321          self.structure =                path + 'structure.png' 
322          self.value =                    path + 'value.png' 
  323   
324   
325   
326  icon_16x16 = I16x16() 
327  icon_22x22 = I22x22() 
328  icon_32x32 = I32x32() 
329  icon_48x48 = I48x48() 
330