Package gui :: Module paths
[hide private]
[frames] | no frames]

Source Code for Module gui.paths

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