00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 import rospy
00024 import os
00025 from roslib.packages import get_pkg_dir
00026 from python_qt_binding.QtGui import *
00027 from python_qt_binding.QtCore import *
00028 from python_qt_binding import loadUi
00029
00030
00031
00032
00033
00034 DIR_COBOTGUI_RESOURCES = os.path.join(get_pkg_dir('airbus_cobot_gui'),'resources')
00035 DIR_COBOTGUI_ACCOUNTS = DIR_COBOTGUI_RESOURCES+'/accounts'
00036 DIR_COBOTGUI_BACKUP = DIR_COBOTGUI_RESOURCES+'/accounts/backup'
00037 DIR_COBOTGUI_IMAGES = DIR_COBOTGUI_RESOURCES+'/images'
00038 DIR_COBOTGUI_LAYOUTS = DIR_COBOTGUI_RESOURCES+'/layouts'
00039 DIR_COBOTGUI_VALUES = DIR_COBOTGUI_RESOURCES+'/values'
00040
00041
00042
00043
00044
00045 class CobotGuiAccounts():
00046 def __init__(self):
00047 class CobotGuiBackup():
00048 def __init__(self):
00049 self.uuid = self.__class__.__name__
00050 self.dir = DIR_COBOTGUI_BACKUP
00051 self.accounts_back = DIR_COBOTGUI_BACKUP+'/accounts_back.db'
00052 def findById(self, id=""):
00053 try:
00054 return getattr(self,id)
00055 except:
00056 return None
00057 self.uuid = self.__class__.__name__
00058 self.dir = DIR_COBOTGUI_ACCOUNTS
00059 self.accounts = DIR_COBOTGUI_ACCOUNTS+'/accounts.db'
00060 self.accounts = DIR_COBOTGUI_ACCOUNTS+'/accounts.xml'
00061 self.encoded_accounts = DIR_COBOTGUI_ACCOUNTS+'/encoded_accounts.db'
00062 self.backup = CobotGuiBackup()
00063 def findById(self, id=""):
00064 try:
00065 return getattr(self,id)
00066 except:
00067 return None
00068
00069 class CobotGuiImages():
00070 def __init__(self):
00071 self.uuid = self.__class__.__name__
00072 self.dir = DIR_COBOTGUI_IMAGES
00073 self.icon_pause = DIR_COBOTGUI_IMAGES+'/icon_pause.png'
00074 self.wellcome_background = DIR_COBOTGUI_IMAGES+'/wellcome_background.png'
00075 self.trad = DIR_COBOTGUI_IMAGES+'/trad.png'
00076 self.logo_airbus_group_2 = DIR_COBOTGUI_IMAGES+'/logo_airbus_group_2.png'
00077 self.open_xml = DIR_COBOTGUI_IMAGES+'/open_xml.png'
00078 self.ico_user = DIR_COBOTGUI_IMAGES+'/ico_user.png'
00079 self.es = DIR_COBOTGUI_IMAGES+'/es.png'
00080 self.en = DIR_COBOTGUI_IMAGES+'/en.png'
00081 self.fr = DIR_COBOTGUI_IMAGES+'/fr.png'
00082 self.de = DIR_COBOTGUI_IMAGES+'/de.png'
00083 self.logo_airbus = DIR_COBOTGUI_IMAGES+'/logo_airbus.png'
00084 self.icon_play = DIR_COBOTGUI_IMAGES+'/icon_play.png'
00085 self.icon_mission = DIR_COBOTGUI_IMAGES+'/icon_mission.png'
00086 self.move = DIR_COBOTGUI_IMAGES+'/move.png'
00087 self.icon_monitoring = DIR_COBOTGUI_IMAGES+'/icon_monitoring.png'
00088 self.desktop_launch = DIR_COBOTGUI_IMAGES+'/desktop_launch.png'
00089 self.airbus_cobot_gui = DIR_COBOTGUI_IMAGES+'/airbus_cobot_gui.png'
00090 self.switch_footer = DIR_COBOTGUI_IMAGES+'/switch_footer.png'
00091 self.ico_alarm = DIR_COBOTGUI_IMAGES+'/ico_alarm.png'
00092 self.icon_emergency_stop_unlock = DIR_COBOTGUI_IMAGES+'/icon_emergency_stop_unlock.png'
00093 self.icon_emergency_stop_locked = DIR_COBOTGUI_IMAGES+'/icon_emergency_stop_locked.png'
00094 self.logo_airbus_group = DIR_COBOTGUI_IMAGES+'/logo_airbus_group.png'
00095 self.wellcome_base = DIR_COBOTGUI_IMAGES+'/wellcome_base.png'
00096 self.icon_emergency_stop = DIR_COBOTGUI_IMAGES+'/icon_emergency_stop.png'
00097 self.status_error = DIR_COBOTGUI_IMAGES+'/status_error.png'
00098 self.status_warning = DIR_COBOTGUI_IMAGES+'/status_warning.png'
00099 self.status_stale = DIR_COBOTGUI_IMAGES+'/status_stale.png'
00100 self.status_ok = DIR_COBOTGUI_IMAGES+'/status_ok.png'
00101
00102 def findById(self, id=""):
00103 try:
00104 return getattr(self,id)
00105 except:
00106 return None
00107
00108 class CobotGuiLayouts():
00109 def __init__(self):
00110 self.uuid = self.__class__.__name__
00111 self.dir = DIR_COBOTGUI_LAYOUTS
00112 self.languages_manager_popup = DIR_COBOTGUI_LAYOUTS+'/languages_manager_popup.ui'
00113 self.add_user_widget = DIR_COBOTGUI_LAYOUTS+'/add_user_widget.ui'
00114 self.account_popup = DIR_COBOTGUI_LAYOUTS+'/account_popup.ui'
00115 self.menu_launcher2 = DIR_COBOTGUI_LAYOUTS+'/menu_launcher2.ui'
00116 self.remove_account_widget = DIR_COBOTGUI_LAYOUTS+'/remove_account_widget.ui'
00117 self.login_dialog = DIR_COBOTGUI_LAYOUTS+'/login_dialog.ui'
00118 self.alarm_widget = DIR_COBOTGUI_LAYOUTS+'/alarm_widget.ui'
00119 self.mainwindow = DIR_COBOTGUI_LAYOUTS+'/mainwindow.ui'
00120 self.users_accounts_dialog = DIR_COBOTGUI_LAYOUTS+'/users_accounts_dialog.ui'
00121 self.welcome = DIR_COBOTGUI_LAYOUTS+'/welcome.ui'
00122 self.accounts_manager_dialog = DIR_COBOTGUI_LAYOUTS+'/accounts_manager_dialog.ui'
00123 self.modif_account_widget = DIR_COBOTGUI_LAYOUTS+'/modif_account_widget.ui'
00124 self.alarm_listview = DIR_COBOTGUI_LAYOUTS+'/alarm_listview.ui'
00125 self.languages_popup = DIR_COBOTGUI_LAYOUTS+'/languages_popup.ui'
00126 self.menu_launcher = DIR_COBOTGUI_LAYOUTS+'/menu_launcher.ui'
00127 self.diagnostics_popup = DIR_COBOTGUI_LAYOUTS+'/diagnostics_popup.ui'
00128 def findById(self, id=""):
00129 try:
00130 return getattr(self,id)
00131 except:
00132 return None
00133
00134 class CobotGuiValues():
00135 def __init__(self):
00136 class CobotGuiStrings():
00137 def __init__(self):
00138 self.uuid = self.__class__.__name__
00139 def findById(self, id=""):
00140 try:
00141 return getattr(self,id)
00142 except:
00143 return None
00144 def alarms_waiting(self, lng="en"):
00145 if lng == "en":
00146 return "alarms waiting ...".decode('utf-8')
00147 elif lng == "fr":
00148 return "alarmes en attente ...".decode('utf-8')
00149 else:
00150 return "alarms waiting ...".decode('utf-8')
00151
00152 def language_selection(self, lng="en"):
00153 if lng == "en":
00154 return "The language selected is".decode('utf-8')
00155 elif lng == "fr":
00156 return "La langue sélectionnée est".decode('utf-8')
00157 elif lng == "de":
00158 return "Die gewählte Sprache".decode('utf-8')
00159 elif lng == "es":
00160 return "El idioma seleccionado es".decode('utf-8')
00161 else:
00162 return "The language selected is".decode('utf-8')
00163
00164 def app_mode(self, lng="en"):
00165 if lng == "en":
00166 return "Switching AUTOMATIC to MANUAL mode".decode('utf-8')
00167 elif lng == "fr":
00168 return "Commutation du mode automatique à manuel".decode('utf-8')
00169 else:
00170 return "Switching AUTOMATIC to MANUAL mode".decode('utf-8')
00171
00172 def auto(self, lng="en"):
00173 if lng == "en":
00174 return "AUTO".decode('utf-8')
00175 elif lng == "fr":
00176 return "AUTO".decode('utf-8')
00177 else:
00178 return "AUTO".decode('utf-8')
00179
00180 def manu(self, lng="en"):
00181 if lng == "en":
00182 return "MANU".decode('utf-8')
00183 elif lng == "fr":
00184 return "MANU".decode('utf-8')
00185 else:
00186 return "MANU".decode('utf-8')
00187
00188 def aborted(self, lng="en"):
00189 if lng == "en":
00190 return "Aborted".decode('utf-8')
00191 elif lng == "fr":
00192 return "Avorté".decode('utf-8')
00193 else:
00194 return "Aborted".decode('utf-8')
00195
00196 def access_rights(self, lng="en"):
00197 if lng == "en":
00198 return "Access rights".decode('utf-8')
00199 elif lng == "fr":
00200 return "Droits d'accès".decode('utf-8')
00201 else:
00202 return "Access rights".decode('utf-8')
00203
00204 def account_manager(self, lng="en"):
00205 if lng == "en":
00206 return "Account manager".decode('utf-8')
00207 elif lng == "fr":
00208 return "Gestion des comptes".decode('utf-8')
00209 else:
00210 return "Account manager".decode('utf-8')
00211
00212 def actions(self, lng="en"):
00213 if lng == "en":
00214 return "Actions".decode('utf-8')
00215 elif lng == "fr":
00216 return "Actions".decode('utf-8')
00217 else:
00218 return "Actions".decode('utf-8')
00219
00220 def add(self, lng="en"):
00221 if lng == "en":
00222 return "Add".decode('utf-8')
00223 elif lng == "fr":
00224 return "Ajouter".decode('utf-8')
00225 else:
00226 return "Add".decode('utf-8')
00227
00228 def add_user(self, lng="en"):
00229 if lng == "en":
00230 return "Add user account".decode('utf-8')
00231 elif lng == "fr":
00232 return "Ajouter compte utilisateur".decode('utf-8')
00233 else:
00234 return "Add user account".decode('utf-8')
00235
00236 def confirm_password(self, lng="en"):
00237 if lng == "en":
00238 return "Confirm password".decode('utf-8')
00239 elif lng == "fr":
00240 return "Confirmer le mot de passe".decode('utf-8')
00241 else:
00242 return "Confirm password".decode('utf-8')
00243
00244 def confirm_your_password(self, lng="en"):
00245 if lng == "en":
00246 return "Confirm your password".decode('utf-8')
00247 elif lng == "fr":
00248 return "Confirmez votre mot de passe".decode('utf-8')
00249 else:
00250 return "Confirm your password".decode('utf-8')
00251
00252 def connection(self, lng="en"):
00253 if lng == "en":
00254 return "Connection".decode('utf-8')
00255 elif lng == "fr":
00256 return "Connection".decode('utf-8')
00257 else:
00258 return "Connection".decode('utf-8')
00259
00260 def current(self, lng="en"):
00261 if lng == "en":
00262 return "Current".decode('utf-8')
00263 elif lng == "fr":
00264 return "Courant".decode('utf-8')
00265 else:
00266 return "Current".decode('utf-8')
00267
00268 def current_password(self, lng="en"):
00269 if lng == "en":
00270 return "Current password".decode('utf-8')
00271 elif lng == "fr":
00272 return "Mot de passe actuel".decode('utf-8')
00273 else:
00274 return "Current password".decode('utf-8')
00275
00276 def emergency_stop(self, lng="en"):
00277 if lng == "en":
00278 return "The system was stopped, be careful before restarting the applications !".decode('utf-8')
00279 elif lng == "fr":
00280 return "Le système a été arrêt, faite attention avant de redémarrer les applications !".decode('utf-8')
00281 else:
00282 return "The system was stopped, be careful before restarting the applications !".decode('utf-8')
00283
00284 def release_emergency_stop(self, lng="en"):
00285 if lng == "en":
00286 return "Release emergency stop".decode('utf-8')
00287 elif lng == "fr":
00288 return "Déverrouillé l'arrêt d'urgence".decode('utf-8')
00289 else:
00290 return "Release emergency stop".decode('utf-8')
00291
00292 def disconnection(self, lng="en"):
00293 if lng == "en":
00294 return "Disconnection".decode('utf-8')
00295 elif lng == "fr":
00296 return "Déconnection".decode('utf-8')
00297 else:
00298 return "Disconnection".decode('utf-8')
00299
00300 def exit(self, lng="en"):
00301 if lng == "en":
00302 return "Exit".decode('utf-8')
00303 elif lng == "fr":
00304 return "Quitter".decode('utf-8')
00305 else:
00306 return "Exit".decode('utf-8')
00307
00308 def invalid_password(self, lng="en"):
00309 if lng == "en":
00310 return "Invalid password !".decode('utf-8')
00311 elif lng == "fr":
00312 return "Mot de passe incorrect !".decode('utf-8')
00313 else:
00314 return "Invalid password !".decode('utf-8')
00315
00316 def invalid_user_id(self, lng="en"):
00317 if lng == "en":
00318 return "Invalid user id !".decode('utf-8')
00319 elif lng == "fr":
00320 return "Identifiant utilisateur incorrect !".decode('utf-8')
00321 else:
00322 return "Invalid user id !".decode('utf-8')
00323
00324 def launch(self, lng="en"):
00325 if lng == "en":
00326 return "Launch".decode('utf-8')
00327 elif lng == "fr":
00328 return "Lanceur".decode('utf-8')
00329 else:
00330 return "Launch".decode('utf-8')
00331
00332 def login(self, lng="en"):
00333 if lng == "en":
00334 return "Login".decode('utf-8')
00335 elif lng == "fr":
00336 return "Connexion".decode('utf-8')
00337 else:
00338 return "Login".decode('utf-8')
00339
00340 def modif(self, lng="en"):
00341 if lng == "en":
00342 return "Modif".decode('utf-8')
00343 elif lng == "fr":
00344 return "Modifier".decode('utf-8')
00345 else:
00346 return "Modif".decode('utf-8')
00347
00348 def modif_user_account(self, lng="en"):
00349 if lng == "en":
00350 return "Modif user account".decode('utf-8')
00351 elif lng == "fr":
00352 return "Modifier compte utilisateur".decode('utf-8')
00353 else:
00354 return "Modif user account".decode('utf-8')
00355
00356 def name(self, lng="en"):
00357 if lng == "en":
00358 return "Name".decode('utf-8')
00359 elif lng == "fr":
00360 return "Nom".decode('utf-8')
00361 else:
00362 return "Name".decode('utf-8')
00363
00364 def new_password(self, lng="en"):
00365 if lng == "en":
00366 return "New password".decode('utf-8')
00367 elif lng == "fr":
00368 return "Nouveau mot de passe".decode('utf-8')
00369 else:
00370 return "New password".decode('utf-8')
00371
00372 def next_step(self, lng="en"):
00373 if lng == "en":
00374 return "Next step".decode('utf-8')
00375 elif lng == "fr":
00376 return "Etape suivante".decode('utf-8')
00377 else:
00378 return "Next step".decode('utf-8')
00379
00380 def off(self, lng="en"):
00381 if lng == "en":
00382 return "Off".decode('utf-8')
00383 elif lng == "fr":
00384 return "Off".decode('utf-8')
00385 else:
00386 return "Off".decode('utf-8')
00387
00388 def ok(self, lng="en"):
00389 if lng == "en":
00390 return "Ok".decode('utf-8')
00391 elif lng == "fr":
00392 return "Ok".decode('utf-8')
00393 else:
00394 return "Ok".decode('utf-8')
00395
00396 def on(self, lng="en"):
00397 if lng == "en":
00398 return "On".decode('utf-8')
00399 elif lng == "fr":
00400 return "On".decode('utf-8')
00401 else:
00402 return "On".decode('utf-8')
00403
00404 def open(self, lng="en"):
00405 if lng == "en":
00406 return "Open".decode('utf-8')
00407 elif lng == "fr":
00408 return "Ouvrir".decode('utf-8')
00409 else:
00410 return "Open".decode('utf-8')
00411
00412 def close(self, lng="en"):
00413 if lng == "en":
00414 return "Close".decode('utf-8')
00415 elif lng == "fr":
00416 return "Fermer".decode('utf-8')
00417 else:
00418 return "Close".decode('utf-8')
00419
00420 def open_mission(self, lng="en"):
00421 if lng == "en":
00422 return "Open mission".decode('utf-8')
00423 elif lng == "fr":
00424 return "Ouvrir une mission".decode('utf-8')
00425 else:
00426 return "Open mission".decode('utf-8')
00427
00428 def parameters(self, lng="en"):
00429 if lng == "en":
00430 return "Parameters".decode('utf-8')
00431 elif lng == "fr":
00432 return "Paramètres".decode('utf-8')
00433 else:
00434 return "Parameters".decode('utf-8')
00435
00436 def password(self, lng="en"):
00437 if lng == "en":
00438 return "Password".decode('utf-8')
00439 elif lng == "fr":
00440 return "Mot de passe".decode('utf-8')
00441 else:
00442 return "Password".decode('utf-8')
00443
00444 def preempt(self, lng="en"):
00445 if lng == "en":
00446 return "Preempt".decode('utf-8')
00447 elif lng == "fr":
00448 return "Préempter".decode('utf-8')
00449 else:
00450 return "Preempt".decode('utf-8')
00451
00452 def remove(self, lng="en"):
00453 if lng == "en":
00454 return "Remove".decode('utf-8')
00455 elif lng == "fr":
00456 return "Supprimer".decode('utf-8')
00457 else:
00458 return "Remove".decode('utf-8')
00459
00460 def remove_user_account(self, lng="en"):
00461 if lng == "en":
00462 return "Remove user account".decode('utf-8')
00463 elif lng == "fr":
00464 return "Supprimer compte utilisateur".decode('utf-8')
00465 else:
00466 return "Remove user account".decode('utf-8')
00467
00468 def rights(self, lng="en"):
00469 if lng == "en":
00470 return "Rights".decode('utf-8')
00471 elif lng == "fr":
00472 return "Droits".decode('utf-8')
00473 else:
00474 return "Rights".decode('utf-8')
00475
00476 def select_access_rights(self, lng="en"):
00477 if lng == "en":
00478 return "Select access rights".decode('utf-8')
00479 elif lng == "fr":
00480 return "Sélectionner un droits accès".decode('utf-8')
00481 else:
00482 return "Select access rights".decode('utf-8')
00483
00484 def select_user(self, lng="en"):
00485 if lng == "en":
00486 return "Select user".decode('utf-8')
00487 elif lng == "fr":
00488 return "Sélectionner un utilisateur".decode('utf-8')
00489 else:
00490 return "Select user".decode('utf-8')
00491
00492 def settings(self, lng="en"):
00493 if lng == "en":
00494 return "Settings".decode('utf-8')
00495 elif lng == "fr":
00496 return "Paramètres".decode('utf-8')
00497 else:
00498 return "Settings".decode('utf-8')
00499
00500 def fields_not_filled(self, lng="en"):
00501 if lng == "en":
00502 return "Some fields are not filled".decode('utf-8')
00503 elif lng == "fr":
00504 return "Certains champs ne sont pas remplis".decode('utf-8')
00505 else:
00506 return "Some fields are not filled".decode('utf-8')
00507
00508 def start(self, lng="en"):
00509 if lng == "en":
00510 return "Start".decode('utf-8')
00511 elif lng == "fr":
00512 return "Démarrer".decode('utf-8')
00513 else:
00514 return "Start".decode('utf-8')
00515
00516 def status(self, lng="en"):
00517 if lng == "en":
00518 return "Status".decode('utf-8')
00519 elif lng == "fr":
00520 return "Statut".decode('utf-8')
00521 else:
00522 return "Status".decode('utf-8')
00523
00524 def stop(self, lng="en"):
00525 if lng == "en":
00526 return "Stop".decode('utf-8')
00527 elif lng == "fr":
00528 return "Arrêter".decode('utf-8')
00529 else:
00530 return "Stop".decode('utf-8')
00531
00532 def passwords_different(self, lng="en"):
00533 if lng == "en":
00534 return "The passwords are different".decode('utf-8')
00535 elif lng == "fr":
00536 return "Les mots de passe sont différents".decode('utf-8')
00537 else:
00538 return "The passwords are different".decode('utf-8')
00539
00540 def add_user_success(self, lng="en"):
00541 if lng == "en":
00542 return "The user was added successfully".decode('utf-8')
00543 elif lng == "fr":
00544 return "L'utilisateur a été ajouté avec succès".decode('utf-8')
00545 else:
00546 return "The user was added successfully".decode('utf-8')
00547
00548 def user_mv_success(self, lng="en"):
00549 if lng == "en":
00550 return "The user was modified successfully".decode('utf-8')
00551 elif lng == "fr":
00552 return "L'utilisateur a été modifié avec succès".decode('utf-8')
00553 else:
00554 return "The user was modified successfully".decode('utf-8')
00555
00556 def user_rm_success(self, lng="en"):
00557 if lng == "en":
00558 return "The user was removed successfully".decode('utf-8')
00559 elif lng == "fr":
00560 return "L'utilisateur a été supprimé avec succès".decode('utf-8')
00561 else:
00562 return "The user was removed successfully".decode('utf-8')
00563
00564 def time(self, lng="en"):
00565 if lng == "en":
00566 return "Time".decode('utf-8')
00567 elif lng == "fr":
00568 return "Temps".decode('utf-8')
00569 else:
00570 return "Time".decode('utf-8')
00571
00572 def user(self, lng="en"):
00573 if lng == "en":
00574 return "User".decode('utf-8')
00575 elif lng == "fr":
00576 return "Utilisateur".decode('utf-8')
00577 else:
00578 return "User".decode('utf-8')
00579
00580 def user_account(self, lng="en"):
00581 if lng == "en":
00582 return "User account".decode('utf-8')
00583 elif lng == "fr":
00584 return "Compte utilisateur".decode('utf-8')
00585 else:
00586 return "User account".decode('utf-8')
00587
00588 def user_guide(self, lng="en"):
00589 if lng == "en":
00590 return "User guide".decode('utf-8')
00591 elif lng == "fr":
00592 return "Guide utilisateur".decode('utf-8')
00593 else:
00594 return "User guide".decode('utf-8')
00595
00596 def user_id(self, lng="en"):
00597 if lng == "en":
00598 return "User id".decode('utf-8')
00599 elif lng == "fr":
00600 return "Identifiant".decode('utf-8')
00601 else:
00602 return "User id".decode('utf-8')
00603
00604 def user_list(self, lng="en"):
00605 if lng == "en":
00606 return "User list".decode('utf-8')
00607 elif lng == "fr":
00608 return "Liste des utilisateurs".decode('utf-8')
00609 else:
00610 return "User list".decode('utf-8')
00611
00612 def traductor(self, lng="en"):
00613 if lng == "en":
00614 return "Traductor".decode('utf-8')
00615 elif lng == "fr":
00616 return "Traducteur".decode('utf-8')
00617 else:
00618 return "Traductor".decode('utf-8')
00619
00620 def language(self, lng="en"):
00621 if lng == "en":
00622 return "Language".decode('utf-8')
00623 elif lng == "fr":
00624 return "Langue".decode('utf-8')
00625 else:
00626 return "Language".decode('utf-8')
00627
00628 class CobotGuiStyles():
00629 def __init__(self):
00630 self.uuid = self.__class__.__name__
00631 self.alarm = "QWidget{background-color: #ffff01;}"
00632 self.background_estop_locked = "QWidget{background-color: #ff0000;}"
00633 self.background_estop_unlocked = "QWidget{background-color: #d9d9d9;}"
00634 self.login = "QDialog{background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #616763, stop: 1 #89928c);}"
00635 self.default_launch = "QPushButton{background-color: rgba(255,0,0,80%);border-radius: 10px;font-size: 12pt;font-weight:60;color: #ffffff;}"
00636 self.transparent_background = "background-color: transparent;font-size: 20pt;"
00637 self.no_background = "background:none;"
00638 self.bad_password = "background-color: #ffffff;border-radius: 5px;font-size: 16pt; font-weight:40; color: rgb(255,0,0);"
00639 self.good_password = "background-color: #ffffff;border-radius: 5px;font-size: 16pt; font-weight:40; color: rgb(0,255,0);"
00640 self.no_password = "background-color: #ffffff;border-radius: 5px;font-size: 16pt; font-weight:40; color: #494842;"
00641 self.text = "QLabel {font-size: 22pt;}"
00642 self.diagnostics = "QWidget{background-color: #ffff01;}"
00643 def findById(self, id=""):
00644 try:
00645 return getattr(self,id)
00646 except:
00647 return None
00648 self.uuid = self.__class__.__name__
00649 self.dir = DIR_COBOTGUI_VALUES
00650 self.launchers = DIR_COBOTGUI_VALUES+'/launchers.xml'
00651 self.strings = CobotGuiStrings()
00652 self.styles = CobotGuiStyles()
00653 def findById(self, id=""):
00654 try:
00655 return getattr(self,id)
00656 except:
00657 return None
00658
00659 class R:
00660 DIR = DIR_COBOTGUI_RESOURCES
00661 accounts = CobotGuiAccounts()
00662 images = CobotGuiImages()
00663 layouts = CobotGuiLayouts()
00664 values = CobotGuiValues()
00665 @staticmethod
00666 def getPixmapById(id=""):
00667 return QPixmap(R.images.findById(id))
00668 @staticmethod
00669 def getIconById(id=""):
00670 return QIcon(R.images.findById(id))
00671
00672
00673