def __init__(self, name, path, lid, parent=None): ''' Initialize the topic item. @param name: the topic name @type name: C{str} ''' QStandardItem.__init__(self, name) self.parent_item = parent self.name = name self.path = path self.package_name = package_name(os.path.dirname(self.path))[0] self.id = lid if self.id == LaunchItem.FOLDER: self.setIcon(QIcon(":/icons/crystal_clear_folder.png")) elif self.id == LaunchItem.PACKAGE: self.setIcon(QIcon(":/icons/crystal_clear_package.png")) elif self.id == LaunchItem.LAUNCH_FILE: self.setIcon(QIcon(":/icons/crystal_clear_launch_file.png")) elif self.id == LaunchItem.RECENT_FILE: self.setIcon(QIcon(":/icons/crystal_clear_launch_file_recent.png")) elif self.id == LaunchItem.STACK: self.setIcon(QIcon(":/icons/crystal_clear_stack.png")) elif self.id == LaunchItem.PROFILE: self.setIcon(QIcon(":/icons/crystal_clear_profile.png")) elif self.id == LaunchItem.RECENT_PROFILE: self.setIcon(QIcon(":/icons/crystal_clear_profile_recent.png"))
def __init__(self, name, path, lid, parent=None): ''' Initialize the topic item. @param name: the topic name @type name: C{str} ''' QStandardItem.__init__(self, name) self.parent_item = parent self.name = name self.path = path self.package_name = package_name(os.path.dirname(self.path))[0] self.id = lid if self.id == LaunchItem.FOLDER: self.setIcon(QIcon(":/icons/crystal_clear_folder.png")) elif self.id == LaunchItem.PACKAGE: self.setIcon(QIcon(":/icons/crystal_clear_package.png")) elif self.id == LaunchItem.LAUNCH_FILE: self.setIcon(QIcon(":/icons/crystal_clear_launch_file.png")) elif self.id == LaunchItem.RECENT_FILE: self.setIcon(QIcon(":/icons/crystal_clear_launch_file_recent.png")) elif self.id == LaunchItem.STACK: self.setIcon(QIcon(":/icons/crystal_clear_stack.png")) elif self.id == LaunchItem.PROFILE: self.setIcon(QIcon(":/icons/crystal_clear_profile.png")) elif self.id == LaunchItem.RECENT_PROFILE: self.setIcon(QIcon(":/icons/crystal_clear_profile_recent.png"))
def __init__(self, service, parent=None): ''' Initialize the service item. @param service: the service object to view @type service: U{master_discovery_fkie.ServiceInfo<http://docs.ros.org/kinetic/api/master_discovery_fkie/html/modules.html#master_discovery_fkie.master_info.ServiceInfo>} ''' QStandardItem.__init__(self, service.name) self.service = service '''@ivar: service info as U{master_discovery_fkie.ServiceInfo<http://docs.ros.org/kinetic/api/master_discovery_fkie/html/modules.html#master_discovery_fkie.master_info.ServiceInfo>}.'''
def __init__(self, service, parent=None): ''' Initialize the service item. @param service: the service object to view @type service: L{master_discovery_fkie.ServiceInfo} ''' QStandardItem.__init__(self, service.name) self.service = service '''@ivar: service info as L{master_discovery_fkie.ServiceInfo}.'''
def __init__(self, service, parent=None): ''' Initialize the service item. @param service: the service object to view @type service: U{master_discovery_fkie.ServiceInfo<http://docs.ros.org/kinetic/api/master_discovery_fkie/html/modules.html#master_discovery_fkie.master_info.ServiceInfo>} ''' QStandardItem.__init__(self, service.name) self.service = service '''@ivar: service info as U{master_discovery_fkie.ServiceInfo<http://docs.ros.org/kinetic/api/master_discovery_fkie/html/modules.html#master_discovery_fkie.master_info.ServiceInfo>}.'''
def __init__(self, name, topic=None, parent=None): ''' Initialize the topic item. @param name: the topic name @type name: C{str} ''' QStandardItem.__init__(self, name) self.parent_item = parent '''@ivar: service info as L{master_discovery_fkie.ServiceInfo}.''' self._publish_thread = None self.topic = TopicInfo(name) if topic is None else topic
def __init__(self, name, topic=None, parent=None): ''' Initialize the topic item. @param name: the topic name @type name: C{str} ''' QStandardItem.__init__(self, name) self.parent_item = parent '''@ivar: service info as L{master_discovery_fkie.ServiceInfo}.''' self._publish_thread = None self.topic = TopicInfo(name) if topic is None else topic
def __init__(self, rapp, running): QStandardItem.__init__(self, rapp['display_name']) self.setSizeHint(QSize(100,100)) icon = get_qicon(rapp['icon']) self.setIcon(icon) f = QFont() f.setPointSize(10) self.setFont(f) self.setToolTip(rapp['description']) self.setEditable(False) self.setRapp(rapp) self.setEnabled(running)
def __init__(self, service, parent=None): ''' Initialize the service item. :param service: the service object to view :type service: fkie_master_discovery.ServiceInfo<http://docs.ros.org/kinetic/api/fkie_master_discovery/html/modules.html#fkie_master_discovery.master_info.ServiceInfo> ''' QStandardItem.__init__(self, service.name) self._parent_item = parent self.service = service ''':ivar self.service: service info as :ref:`fkie_master_discovery.ServiceInfo<http://docs.ros.org/kinetic/api/fkie_master_discovery/html/modules.html#fkie_master_discovery.master_info.ServiceInfo>`.''' self._with_namespace = rospy.names.SEP in service.name
def __init__(self, name, value, parent=None): ''' Initialize the item object. @param name: the name of the parameter @type name: C{str} @param value: the value of the parameter @type value: C{str} ''' QStandardItem.__init__(self, name) self._name = name '''@ivar: the name of parameter ''' self._value = value '''@ivar: the value of the parameter '''
def __init__(self, name, topic=None, parent=None): ''' Initialize the topic item. @param name: the topic name @type name: C{str} @param topic: the topic info @type topic: U{master_discovery_fkie.TopicInfo<http://docs.ros.org/kinetic/api/master_discovery_fkie/html/modules.html#master_discovery_fkie.master_info.TopicInfo>} ''' QStandardItem.__init__(self, name) self.parent_item = parent self._publish_thread = None self.topic = TopicInfo(name) if topic is None else topic '''@ivar: topic as U{master_discovery_fkie.TopicInfo<http://docs.ros.org/kinetic/api/master_discovery_fkie/html/modules.html#master_discovery_fkie.master_info.TopicInfo>}.'''
def __init__(self, name, value, parent=None): ''' Initialize the item object. @param name: the name of the parameter @type name: C{str} @param value: the value of the parameter @type value: C{str} ''' QStandardItem.__init__(self, utf8(type(value)).replace("<type '", '').replace("'>", '')) self._name = name '''@ivar: the name of parameter ''' self._value = value '''@ivar: the value of the parameter '''
def __init__(self, name, value, parent=None): """ Initialize the item object. @param name: the name of the parameter @type name: C{str} @param value: the value of the parameter @type value: C{str} """ QStandardItem.__init__(self, str(type(value)).replace("<type '", "").replace("'>", "")) self._name = name """@ivar: the name of parameter """ self._value = value """@ivar: the value of the parameter """
def __init__(self, name, topic=None, parent=None): ''' Initialize the topic item. :param str name: the topic name :param topic: the topic info :type topic: U{master_discovery_fkie.TopicInfo<http://docs.ros.org/kinetic/api/master_discovery_fkie/html/modules.html#master_discovery_fkie.master_info.TopicInfo>} ''' QStandardItem.__init__(self, name) self._parent_item = parent self._publish_thread = None self.topic = TopicInfo(name) if topic is None else topic '''@ivar: topic as U{master_discovery_fkie.TopicInfo<http://docs.ros.org/kinetic/api/master_discovery_fkie/html/modules.html#master_discovery_fkie.master_info.TopicInfo>}.''' self._with_namespace = rospy.names.SEP in name
def __init__(self, name, value, parent=None): ''' Initialize the item object. @param name: the name of the parameter @type name: C{str} @param value: the value of the parameter @type value: C{str} ''' QStandardItem.__init__(self, utf8(value) if not isinstance(value, Binary) else utf8(value)) self._name = name '''@ivar: the name of parameter ''' self._value = value '''@ivar: the value of the parameter ''' if isinstance(value, (str, unicode)) and value.find('\n') > -1: self.setSizeHint(QSize(-1, 45))
def __init__(self, name, value, parent=None): """ Initialize the item object. @param name: the name of the parameter @type name: C{str} @param value: the value of the parameter @type value: C{str} """ QStandardItem.__init__(self, unicode(value) if not isinstance(value, Binary) else str(value)) self._name = name """@ivar: the name of parameter """ self._value = value """@ivar: the value of the parameter """ if isinstance(value, (str, unicode)) and value.find("\n") > -1: self.setSizeHint(QSize(-1, 45))
def __init__(self, name, parent=None, is_group=False): ''' Initialize the ServiceGroupItem object with given values. :param str name: the name of the group :param parent: the parent item. In most cases this is the HostItem. The variable is used to determine the different columns of the NodeItem. :type parent: :class:`QtGui.QStandardItem` <https://srinikom.github.io/pyside-docs/PySide/QtGui/QStandardItem.html> :param bool is_group: True if this is a capability group. In other case it is a namespace group. ''' dname = 'services@master/' if is_group: dname = '{%s}' % name elif name != rospy.names.SEP: dname = '%s/' % name QStandardItem.__init__(self, dname) self.parent_item = parent self._name = name self._is_group = is_group self.is_system_group = name == 'SYSTEM'
def __init__(self, master, local=False, quality=None, parent=None): self.name = ''.join([master.name, ' (localhost)']) if local else master.name QStandardItem.__init__(self, self.name) self.parent_item = None self._master = master self.local = local self.__quality = quality self.descr = '' self.ICONS = {'green': QIcon(":/icons/stock_connect_green.png"), 'yellow': QIcon(":/icons/stock_connect_yellow.png"), 'red': QIcon(":/icons/stock_connect_red.png"), 'grey': QIcon(":/icons/stock_connect.png"), 'disconnected': QIcon(":/icons/stock_disconnect.png"), 'warning': QIcon(':/icons/crystal_clear_warning.png'), 'clock_warn': QIcon(':/icons/crystal_clear_xclock_fail.png')} self.master_ip = None self._master_errors = [] self._timediff = 0 self._threaded_get_ip() self.updateNameView(master, quality, self)
def __init__(self, name, value, parent=None): ''' Initialize the item object. @param name: the name of the parameter @type name: C{str} @param value: the value of the parameter @type value: C{str} ''' value_str = utf8(value) if not isinstance(value, xmlrpcclient.Binary) else utf8(value) self.read_only = False if len(value_str) > 32000: value_str = 'value size > 32000; use Ctrl+X to copy' self.read_only = True QStandardItem.__init__(self, value_str) self.setEditable(not self.read_only) self._name = name '''@ivar: the name of parameter ''' self._value = value '''@ivar: the value of the parameter ''' if isstring(value) and value.find('\n') > -1: self.setSizeHint(QSize(-1, 45))
def __init__(self, implementation, enabled, running, extended_tooltip_info=""): """ :param implementation: one of either rocon_interactions.Pairing or rocon_interactions.Interaction :param bool running: """ QStandardItem.__init__(self, implementation.name) self.setSizeHint(QSize(100, 100)) self.setIcon(rocon_icon_to_qicon(implementation.icon)) f = QFont() f.setPointSize(8) self.setFont(f) self.setToolTip(implementation.description + extended_tooltip_info) self.setEditable(False) self.setEnabled(enabled) if running: self.setBackground(QColor(100, 100, 150)) self.implementation = implementation
def __init__(self, master, local=False, quality=None, parent=None): self.name = ''.join([master.name, ' (localhost)']) if local else master.name QStandardItem.__init__(self, '') # self.name) self.parent_item = None self._master = master self.local = local self.__quality = quality self.descr = '' self.ICONS = {'green': nm.settings().icon('stock_connect_green.png'), 'yellow': nm.settings().icon('stock_connect_yellow.png'), 'red': nm.settings().icon('stock_connect_red.png'), 'grey': nm.settings().icon('stock_connect.png'), 'disconnected': nm.settings().icon('stock_disconnect.png'), 'warning': nm.settings().icon('crystal_clear_warning.png'), 'clock_warn': nm.settings().icon('crystal_clear_xclock_fail.png')} self.master_ip = None self._master_errors = [] self._diagnostics = [] self._timediff = 0 self._threaded_get_ip() self.updateNameView(master, quality, self)
def __init__(self, path, path_id, mtime, size, name, isnew=False): ''' Initialize the PathItem object with given values. The name of the item is the base name of the path. Examples of paths: - grpc://localhost:12311: -> name: @localhost - grpc://localhost:12311:/absolute/path -> name: path :param str url: the url of node manager daemon :param str path: file path :param int path_id: identification of the path (folder, package, launch file, ...) :param int mtime: modification time :param int size: file size :param str name: the displayed name :param bool isnew: set to True if it a new file ''' # self._url = url # self.url_parse_result = urlparse(url) self._path = path self.id = self._identify_path_on_ext(path) if path_id in [ self.FILE ] else path_id self._isnew = isnew pathname = name if pathname == 'src': pathname = '%s (src)' % os.path.basename(os.path.dirname(path)) self._name = pathname QStandardItem.__init__(self, self._name) self.mtime = mtime self.size = size if self.id == self.RECENT_FILE or self.id == self.RECENT_PROFILE: pname = package_name(path)[0] if pname is None: pname, _ = nmdurl.split(path, with_scheme=True) self.package_name = pname self._update_icon()
:type value: any std types :param settings: the object, which contains `attrname` as property and provide the parameter changes :type settings: object (Settings) :param attrname: the parameter name, which is available as property in `settings` object. :type attrname: str :param edit_type: the editor type will be detected automatically by default. For different editors you can set manually the `EDIT_TYPE_*` :type edit_type: int (`EDIT_TYPE_*`) :param value_default: the default value, is needed for reset functionality :param value_min: the maximum value (used by int or float) :param value_max: the minimum value (used by int or float) :param value_list: the list of values used for comboboxes ''' QStandardItem.__init__(self, '%s' % value) self._attrname = attrname self._value = value self._value_default = value_default self._value_min = value_min self._value_max = value_max self._settings = settings self._edit_type = edit_type self._value_list = value_list def type(self): return SettingsValueItem.ITEM_TYPE def attrname(self): return self._attrname
def __init__(self, name, tooltip=''): QStandardItem.__init__(self, name) self.name = name self.tooltip = tooltip
def __init__(self, name): QStandardItem.__init__(self, name) self.name = name
:type value: any std types :param settings: the object, which contains `attrname` as property and provide the parameter changes :type settings: object (Settings) :param attrname: the parameter name, which is available as property in `settings` object. :type attrname: str :param edit_type: the editor type will be detected automatically by default. For different editors you can set manually the `EDIT_TYPE_*` :type edit_type: int (`EDIT_TYPE_*`) :param value_default: the default value, is needed for reset functionality :param value_min: the maximum value (used by int or float) :param value_max: the minimum value (used by int or float) :param value_list: the list of values used for comboboxes ''' QStandardItem.__init__(self, '%s' % value) self._attrname = attrname self._value = value self._value_default = value_default self._value_min = value_min self._value_max = value_max self._settings = settings self._edit_type = edit_type self._value_list = value_list self._value_step = value_step self._need_restart = need_restart def type(self): return SettingsValueItem.ITEM_TYPE def attrname(self):
def __init__(self, name): QStandardItem.__init__(self, name) self.name = name
def __init__(self, name, tooltip=''): QStandardItem.__init__(self, name) self.name = name self.tooltip = tooltip
def __init__(self, master): QStandardItem.__init__(self) self.name = master.name self.button = MasterSyncButtonHelper(master) self.parent_item = None
def __init__(self, master): QStandardItem.__init__(self) self.name = master.name self.button = MasterSyncButtonHelper(master) self.parent_item = None