def __init__(self, *args, **kwargs):
        FastObjectListView.__init__(self, *args, **kwargs)
        """Max Number of Allowed Plots"""
        self.allowedLimit = 6

        """List of modelObjects"""
        self._modelObjects = []

        """Focused Object"""
        self.currentlySelectedObject = None

        """Object being edited"""
        self.editingObject = None

        self._buildColumns()
        self.CreateCheckStateColumn()

        def rowFormatter(listItem, point):
            listItem.SetFont(wx.Font(11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False))

        self.rowFormatter = rowFormatter
Пример #2
0
    def __init__(self, *args, **kwargs):
        FastObjectListView.__init__(self, *args, **kwargs)
        """Max Number of Allowed Plots"""
        self.allowedLimit = 6
        """List of modelObjects"""
        self._modelObjects = []
        """Focused Object"""
        self.currentlySelectedObject = None
        """Object being edited"""
        self.editingObject = None

        self._buildColumns()
        self.CreateCheckStateColumn()

        def rowFormatter(listItem, point):
            listItem.SetFont(
                wx.Font(11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL,
                        wx.FONTWEIGHT_NORMAL, False))

        self.rowFormatter = rowFormatter
        self.Bind(wx.EVT_LIST_KEY_DOWN, self.onKeyPress)
Пример #3
0
    def __init__(self, *args, **kwargs):
        """

        :param args:
        :param kwargs:
        :return:
        """

        try:
            self.serviceManager = kwargs.pop("serviceManager")
        except:
            self.serviceManager = None
        try:
            self.recordService = kwargs.pop("recordService")
        except:
            self.recordService = None

        FastObjectListView.__init__(self, *args, **kwargs)

        cellEdit = CellEdit(self, self.serviceManager, self.recordService)

        self.checkedObjects = []

        # # Custom Image Getters
        self.imgGetterDataValue = cellEdit.imgGetterDataValue
        self.imgGetterDate = cellEdit.imgGetterDate
        self.imgGetterTime = cellEdit.imgGetterTime
        self.imgGetterCensorCode = cellEdit.imgGetterCensorCode
        self.imgGetterUTCOffset = cellEdit.imgGetterUTCOFFset
        self.imgGetterValueAcc = cellEdit.imgGetterValueAcc
        self.imgGetterlabSample = cellEdit.imgGetterLabSampleCode
        self.imgGetterQualifier = cellEdit.imgGetterQualifierCode
        self.imgGetterOffSetType = cellEdit.imgGetterOffSetType
        self.imgGetterOffSetValue = cellEdit.imgGetterOffSetValue

        ## Custom Value Setters
        ## Sets the value, can modify rules for setting value
        self.valueSetterDataValue = cellEdit.valueSetterDataValue
        self.valueSetterUTCOffset = cellEdit.valueSetterUTCOffset

        ## Custom String Converters
        ## Changes how the string will appear in the cell after editing
        self.localtime2Str = cellEdit.strConverterLocalTime
        self.str2DataValue = cellEdit.strConverterDataValue
        self.utcOffSet2Str = cellEdit.strConverterUTCOffset
        self.offSetValue2Str = cellEdit.strConverterOffSetValue

        ## Custom CellEditors
        ## Custom cell editors for each cell
        self.dateEditor = cellEdit.dateEditor
        self.timeEditor = cellEdit.localTimeEditor
        self.censorEditor = cellEdit.censorCodeEditor
        self.offSetTypeEditor = cellEdit.offSetTypeEditor
        self.qualifierCodeEditor = cellEdit.qualifierCodeEditor
        self.labSampleEditor = cellEdit.labSampleCodeEditor

        self.SetEmptyListMsg("Add points either by csv or by adding a new row")
        self.AddNamedImages("error", x_mark_16.GetBitmap(),
                            x_mark_32.GetBitmap())
        self.AddNamedImages("star", star_16.GetBitmap(), star_32.GetBitmap())
        self.AddNamedImages("check", check_mark_3_16.GetBitmap(),
                            check_mark_3_32.GetBitmap())

        self.buildOlv()

        self.useAlternateBackColors = True
        self.oddRowsBackColor = wx.Colour(191, 239, 255)
        self.cellEditMode = self.CELLEDIT_DOUBLECLICK
Пример #4
0
    def __init__(self, *args, **kwargs):
        """

        :param args:
        :param kwargs:
        :return:
        """

        try:
            self.serviceManager = kwargs.pop("serviceManager")
        except:
            self.serviceManager = None
        try:
            self.recordService = kwargs.pop("recordService")
        except:
            self.recordService = None


        FastObjectListView.__init__(self, *args, **kwargs)

        cellEdit = CellEdit(self, self.serviceManager, self.recordService)

        self.checkedObjects = []

        # # Custom Image Getters
        self.imgGetterDataValue = cellEdit.imgGetterDataValue
        self.imgGetterDate = cellEdit.imgGetterDate
        self.imgGetterTime = cellEdit.imgGetterTime
        self.imgGetterCensorCode = cellEdit.imgGetterCensorCode
        self.imgGetterUTCOffset = cellEdit.imgGetterUTCOFFset
        self.imgGetterValueAcc = cellEdit.imgGetterValueAcc
        self.imgGetterlabSample = cellEdit.imgGetterLabSampleCode
        self.imgGetterQualifier = cellEdit.imgGetterQualifierCode
        self.imgGetterOffSetType = cellEdit.imgGetterOffSetType
        self.imgGetterOffSetValue = cellEdit.imgGetterOffSetValue

        ## Custom Value Setters
        ## Sets the value, can modify rules for setting value
        self.valueSetterDataValue = cellEdit.valueSetterDataValue
        self.valueSetterUTCOffset = cellEdit.valueSetterUTCOffset

        ## Custom String Converters
        ## Changes how the string will appear in the cell after editing
        self.localtime2Str = cellEdit.strConverterLocalTime
        self.str2DataValue = cellEdit.strConverterDataValue
        self.utcOffSet2Str = cellEdit.strConverterUTCOffset
        self.offSetValue2Str = cellEdit.strConverterOffSetValue

        ## Custom CellEditors
        ## Custom cell editors for each cell
        self.dateEditor = cellEdit.dateEditor
        self.timeEditor = cellEdit.localTimeEditor
        self.censorEditor = cellEdit.censorCodeEditor
        self.offSetTypeEditor = cellEdit.offSetTypeEditor
        self.qualifierCodeEditor = cellEdit.qualifierCodeEditor
        self.labSampleEditor = cellEdit.labSampleCodeEditor

        self.SetEmptyListMsg("Add points either by csv or by adding a new row")
        self.AddNamedImages("error", x_mark_16.GetBitmap(), x_mark_32.GetBitmap())
        self.AddNamedImages("star", star_16.GetBitmap(), star_32.GetBitmap())
        self.AddNamedImages("check", check_mark_3_16.GetBitmap(), check_mark_3_32.GetBitmap())

        self.buildOlv()

        self.useAlternateBackColors = True
        self.oddRowsBackColor = wx.Colour(191, 239, 255)
        self.cellEditMode = self.CELLEDIT_DOUBLECLICK