Package node_manager_fkie :: Module launch_list_model :: Class LaunchListModel
[frames] | no frames]

Class LaunchListModel

source code

PySide.QtCore.QAbstractListModel --+
                                   |
                                  LaunchListModel

The model to manage the files with launch files.

Instance Methods
 
__init__(self)
Creates a new list model.
source code
 
rowCount(self, parent=QtCore.QModelIndex())
Tell the view how many rows we have present in our data.
source code
 
data(self, index, role=QtCore.Qt.DisplayRole)
The view asks us for all sorts of information about our data...
source code
PySide.QtCore.Qt.ItemFlag
flags(self, index)
Make the only selectable
source code
 
reloadCurrentPath(self)
Reloads the current path.
source code
boolean
isLaunchFile(self, row)
Tests for the given row whether it is a launch file or not.
source code
str or None
getFilePath(self, item)
Returns for the given item the file path if this is a file.
source code
 
setPath(self, path)
Shows the new path in the launch configuration view.
source code
 
add2LoadHistory(self, file) source code
Class Variables
  NOT_FOUND = -1
  NOTHING = 0
  RECENT_FILE = 1
  LAUNCH_FILE = 2
  FOLDER = 3
  PACKAGE = 4
  STACK = 5
  RECENT_LENGTH = 5
Method Details

__init__(self)
(Constructor)

source code 

Creates a new list model. Loads the required icons.

rowCount(self, parent=QtCore.QModelIndex())

source code 

Tell the view how many rows we have present in our data.

Parameters:
  • parent (QtCore.QModelIndex) - parent of the list

data(self, index, role=QtCore.Qt.DisplayRole)

source code 

The view asks us for all sorts of information about our data...

Parameters:
  • index (QtCore.QModelIndex) - parent of the list
  • role (QtCore.Qt.DisplayRole) - the art of the data

flags(self, index)

source code 

Make the only selectable

Parameters:
  • index (QtCore.QModelIndex) - parent of the list
Returns: PySide.QtCore.Qt.ItemFlag
Flag or the requestet item

isLaunchFile(self, row)

source code 

Tests for the given row whether it is a launch file or not.

Returns: boolean
True if it is a launch file

getFilePath(self, item)

source code 

Returns for the given item the file path if this is a file. Otherwise the folder will be expanded and None will be returned.

Parameters:
  • item (str) - the list item
Returns: str or None
path of the launch file or None

setPath(self, path)

source code 

Shows the new path in the launch configuration view. Only if the new path is in ros package paths

Parameters:
  • path (str) - new path