35 from python_qt_binding
import QT_BINDING, QT_BINDING_MODULES, QT_BINDING_VERSION
36 from python_qt_binding.QtCore
import QObject, qVersion
37 from python_qt_binding.QtWidgets
import QMessageBox
39 from .ros_package_helper
import get_package_path
44 Handler for the 'About action' menu bar item. 46 This handler shows a message box with details on the used libraries and their versions. 50 super(AboutHandler, self).
__init__(parent)
60 sys.path.append(os.path.join(qt_gui_cpp_path,
'lib'))
61 sys.path.append(os.path.join(qt_gui_cpp_path,
'src'))
62 from qt_gui_cpp.cpp_binding_helper
import qt_gui_cpp
65 _rospkg_version = getattr(rospkg,
'__version__',
'< 0.2.4')
67 logo = os.path.join(self.
_qtgui_path,
'resource',
'ros_org_vertical.png')
68 text =
'<img src="%s" width="56" height="200" style="float: left;"/>' % logo
70 text +=
'<h3 style="margin-top: 1px;">%s</h3>' % self.tr(
'rqt')
72 text +=
'<p>%s %s</p>' % (
73 self.tr(
'rqt is a framework for graphical user interfaces.'),
74 self.tr(
'It is extensible with plugins which can be written in either Python or C++.'))
75 text +=
'<p>%s</p>' % (
77 'Please see the <a href="%s">Wiki</a> for more information on rqt and available ' 78 'plugins.' %
'http://wiki.ros.org/rqt'))
80 text +=
'<p>%s: ' % self.tr(
'Utilized libraries:')
82 text +=
'Python %s, ' % platform.python_version()
84 text +=
'rospkg %s, ' % _rospkg_version
86 if QT_BINDING ==
'pyside':
88 elif QT_BINDING ==
'pyqt':
90 text +=
' %s (%s), ' % (QT_BINDING_VERSION,
', '.join(sorted(QT_BINDING_MODULES)))
92 text +=
'Qt %s, ' % qVersion()
94 if qt_gui_cpp
is not None:
95 if QT_BINDING ==
'pyside':
96 text +=
'%s' % (self.tr(
'%s C++ bindings available') %
'Shiboken')
97 elif QT_BINDING ==
'pyqt':
98 text +=
'%s' % (self.tr(
'%s C++ bindings available') %
'SIP')
100 text +=
'%s' % self.tr(
'C++ bindings available')
102 text +=
'%s' % self.tr(
'no C++ bindings found - no C++ plugins available')
107 QMessageBox.NoIcon, self.tr(
'About rqt'), text, QMessageBox.Ok, self.parent())
def __init__(self, qtgui_path, parent=None)
def get_package_path(name)