def __init__(self): """ Creates a new list model. """ QStandardItemModel.__init__(self) self.setColumnCount(len(ParameterModel.header)) self.setHorizontalHeaderLabels([label for label, _ in ParameterModel.header])
def __init__(self, parent=None, progress_queue=None, viewobj=None): ''' Creates a new list model. ''' QStandardItemModel.__init__(self, parent) self.viewobj = viewobj self.setColumnCount(len(LaunchListModel.header)) self.setHorizontalHeaderLabels( [label for label, _width in LaunchListModel.header]) self.pyqt_workaround = dict( ) # workaround for using with PyQt: store the python object to keep the defined attributes in the TopicItem subclass self.items = [] self._roots = {} self._current_path = nmdurl.nmduri() self._current_master = masteruri_from_master() self._current_master_name = '' self.ros_root_paths = {} # {url: [root pasth(str)]} self.ros_root_paths[self._current_path] = [ os.path.normpath(p) for p in os.getenv("ROS_PACKAGE_PATH").split(':') ] self._progress_queue = progress_queue nm.nmd().file.listed_path.connect(self._listed_path) nm.nmd().file.packages_available.connect(self._on_new_packages) nm.nmd().file.error.connect(self._nmd_error)
def __init__(self): ''' Creates a new list model. ''' QStandardItemModel.__init__(self) self.setColumnCount(len(ParameterModel.header)) self.setHorizontalHeaderLabels([label for label, _ in ParameterModel.header])
def __init__(self): ''' Creates a new list model. ''' QStandardItemModel.__init__(self) self.setColumnCount(len(SettingsModel.header)) self.setHorizontalHeaderLabels([label for label, _ in SettingsModel.header]) self.pyqt_workaround = dict() # workaround for using with PyQt: store the python object to keep the defined attributes in the TopicItem subclass
def __init__(self): ''' Creates a new list model. ''' QStandardItemModel.__init__(self) self.setColumnCount(len(ServiceModel.header)) self.setHorizontalHeaderLabels([label for label, _ in ServiceModel.header]) self.pyqt_workaround = dict() # workaround for using with PyQt: store the python object to keep the defined attributes in the ServiceItem subclass
def __init__(self, local_masteruri=None): ''' Creates a new list model. ''' QStandardItemModel.__init__(self) self.setColumnCount(len(MasterModel.header)) self._masteruri = local_masteruri self.parent_view = None self.pyqt_workaround = dict() # workaround for using with PyQt: store the python object to keep the defined attributes in the MasterItem subclass
def __init__(self): ''' Creates a new list model. ''' QStandardItemModel.__init__(self) self.setColumnCount(len(TopicModel.header)) self.setHorizontalHeaderLabels([label for label, _ in TopicModel.header]) topics = ['/rosout', '/rosout_agg', '/diagnostics_agg'] def_list = ['\A' + n.strip().replace('*', '.*') + '\Z' for n in topics] self._re_cap_systopics = re.compile('|'.join(def_list), re.I) self.pyqt_workaround = dict() # workaround for using with PyQt: store the python object to keep the defined attributes in the TopicItem subclass root_items = TopicGroupItem.create_item_list(rospy.names.SEP, self.invisibleRootItem(), False) self.invisibleRootItem().appendRow(root_items) self._pyqt_workaround_add(rospy.names.SEP, root_items[0])
def __init__(self): ''' Creates a new list model. ''' QStandardItemModel.__init__(self) self.setColumnCount(len(LaunchListModel.header)) self.setHorizontalHeaderLabels([label for label, _width in LaunchListModel.header]) self.pyqt_workaround = dict() # workaround for using with PyQt: store the python object to keep the defined attributes in the TopicItem subclass self.items = [] self.DIR_CACHE = {} self.currentPath = None self.root_paths = [os.path.normpath(p) for p in os.getenv("ROS_PACKAGE_PATH").split(':')] self._setNewList(self._moveUp(None)) self.__packages = {} self._fill_packages_thread = PackagesThread()
def __init__(self, parent=None): # FIXME: why is this not working? should be the same as the following line... #super(MessageTreeModel, self).__init__(parent) QStandardItemModel.__init__(self, parent)