Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 try:
00037 from python_qt_binding.QtCore import QModelIndex
00038 except ImportError:
00039 from python_qt_binding.QtGui import QModelIndex
00040
00041
00042 class TreenodeStatus(QModelIndex):
00043 """
00044
00045 This class contains very similar information with
00046 rqt_reconfigure.ParameterItem. The purpose of this class is to enable
00047 FilterChildrenModel (subclassing QSortFilterProxyModel) to look up each
00048 node, which, afaik, is not possible via QSortFilterProxyModel and that's
00049 why I created this class.
00050
00051 That said, to store an info about each treenode:
00052
00053 - ParameterItem should be used to show on view.
00054 - This class should be used when you need to keep track from
00055 QAbstractProxyModel
00056
00057 :author: Isaac Saito
00058 """
00059
00060 def __init__(self, nodename_full=None, qmindex=None):
00061 """
00062 :param index_id: default value is -1, which indicates "not set". This
00063 can be set.
00064 :param nodename_full: default value is None, which indicates "not set".
00065 This can be set.
00066 :type index_id: qint64
00067 :type nodename_full: str
00068 :type qmindex: QModelIndex
00069 """
00070 super(TreenodeStatus, self).__init__(qmindex)
00071
00072 self._is_eval_done = False
00073 self._shows = False
00074 self._nodename_full = nodename_full
00075
00076 def set_nodename_full(self, nodename_full):
00077 self._nodename_full = nodename_full
00078
00079 def get_nodename_full(self):
00080 return self._nodename_full
00081
00082 def set_is_eval_done(self, v):
00083 self._is_eval_done = v
00084
00085 def get_is_eval_done(self):
00086 return self._is_eval_done
00087
00088 def set_shows(self, v):
00089 self._shows = v
00090
00091 def get_shows(self):
00092 return self._shows