Go to the documentation of this file.00001 from dashboard_provider import DashboardProvider
00002 from dashboard import Dashboard
00003 from wrapper_dashboard import DashboardPopup
00004
00005 from roslib.packages import get_pkg_dir
00006 from python_qt_binding.QtGui import *
00007 from python_qt_binding.QtCore import *
00008 from airbus_cobot_gui.context import Context
00009 from xml.etree import ElementTree as ET
00010
00011 def getStandAloneInstance(pkg_name, dashboard_class, lng="en"):
00012
00013 dashboard_instance = dashboard_class(Context(QMainWindow()))
00014
00015 dashboard_descriptor = ET.parse("%s/dashboard_descriptor.xml"%get_pkg_dir(pkg_name))
00016
00017 dashboard_params = DashboardProvider.getParameters(dashboard_descriptor.getroot(), None)
00018
00019 dashboard_instance.setup(dashboard_descriptor, dashboard_params)
00020
00021 dashboard_instance.onTranslate(lng)
00022
00023 return dashboard_instance