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