示例#1
0
 def __init__(self, win, params_mgr):
     CommonUserDBTableModel.__init__(self, HEADERS, ORDER)
     UserDBTableAction.__init__(self, params_mgr, win, "Exchange Species",
                           "add and edit custom exchange species (EXCHANGE_SPECIES)", self,
                 help=HELP)
     self._radiobox = None
     self._coefa = None
     self._coefb = None
示例#2
0
    def __init__(self, win, params_mgr):
        CommonUserDBTableModel.__init__(self, HEADERS, ORDER)

        UserDBTableAction.__init__(self,
                                   params_mgr,
                                   win,
                                   "Materials",
                                   "To edit and add custom Materials ",
                                   self,
                                   help=HELP)
示例#3
0
 def __init__(self, win, params_mgr):
     CommonUserDBTableModel.__init__(self, HEADERS, ORDER)
     UserDBTableAction.__init__(
         self,
         params_mgr,
         win,
         "Exchange Master Species",
         "add and edit custom exchange sites (EXCHANGE_MASTER_SPECIES)",
         self,
         help=HELP)
示例#4
0
 def __init__(self, win, params_mgr):
     CommonUserDBTableModel.__init__(self, HEADERS, ORDER)
     UserDBTableAction.__init__(
         self,
         params_mgr,
         win,
         "Surface Complexation Species",
         "add and edit custom Surface Species (SURFACE_SPECIES)",
         self,
         help=HELP)
示例#5
0
    def __init__(self, win, params_mgr):
        CommonUserDBTableModel.__init__(self, HEADERS, ORDER)

        UserDBTableAction.__init__(
            self,
            params_mgr,
            win,
            "Mineral Phases",
            "Add and Edit custom mineral phases (PHASES)",
            self,
            help=HELP)
    def __init__(self, win, params_mgr):
        CommonUserDBTableModel.__init__(self, HEADERS, ORDER)

        UserDBTableAction.__init__(
            self,
            params_mgr,
            win,
            "Aqueous Secondary Species",
            "add and edit custom Aqueous secondary species (SOLUTION_SPECIES)",
            self,
            help=HELP)
示例#7
0
    def __init__(self, win, params_mgr):

        CommonUserDBTableModel.__init__(self, HEADERS, ORDER)

        UserDBTableAction.__init__(
            self,
            params_mgr,
            win,
            "Aqueous Master Species",
            "add and edit custom Aqueous master species",
            self,
            help=HELP)
示例#8
0
 def __init__(self, win, params_mgr):
     CommonUserDBTableModel.__init__(self, HEADERS, ORDER)
     UserDBTableAction.__init__(
         self,
         params_mgr,
         win,
         "Exchange Species",
         "add and edit custom exchange species (EXCHANGE_SPECIES)",
         self,
         help=HELP)
     self._radiobox = None
     self._coefa = None
     self._coefb = None
示例#9
0
    def createEntryEditDialog(self, params_list):
        others = params_list[:-3]  #  handle the last 3 params manually
        alaw, a, b = params_list[-3:]

        d = UserDBTableAction.createEntryEditDialog(self, others)
        d.getEditorByName(HEADERS[FORMULA]).SetEditable(False)

        # create the controls for the activity law and its parameters
        self._radiobox = rb = wx.RadioBox(d, -1, "law type",
                                          wx.DefaultPosition, wx.DefaultSize,
                                          ACTIVITY_LAWS, 1, wx.RA_SPECIFY_COLS)
        rb.param = alaw
        rb.Bind(wx.EVT_RADIOBOX, self.updateRadioBox)
        rb.SetSelection(ACTIVITY_LAWS.index(alaw.getValue()))

        self._coefa = coefa = wx.TextCtrl(d,
                                          -1,
                                          str(a.getValue()),
                                          validator=ParameterValidator(a))
        self._coefb = coefb = wx.TextCtrl(d,
                                          -1,
                                          str(b.getValue()),
                                          validator=ParameterValidator(b))

        self.updateRadioBox()  #now we can update all

        # layout... gui .....

        d.addToGrid(wx.StaticText(d, -1, "Activity Law"), 0)

        box = wx.BoxSizer(wx.HORIZONTAL)
        box.Add(rb)

        coef_box = wx.StaticBoxSizer(
            wx.StaticBox(d, -1, "Debye Huckel Coefficients"), wx.VERTICAL)
        flag = wx.ALIGN_CENTER_VERTICAL | wx.EXPAND
        abox = wx.BoxSizer(wx.HORIZONTAL)
        abox.Add(wx.StaticText(d, -1, "a"))
        abox.Add(coefa, flag=flag)
        coef_box.Add(abox, flag=flag)

        bbox = wx.BoxSizer(wx.HORIZONTAL)
        bbox.Add(wx.StaticText(d, -1, "b"))
        bbox.Add(coefb, flag=flag)
        coef_box.Add(bbox, flag=flag)

        box.Add(coef_box, proportion=1, flag=wx.EXPAND | wx.ALL)
        d.addToGrid(box, 1)

        d.Fit()
        return d
示例#10
0
    def createEntryEditDialog(self, params_list):
        others = params_list[:-3] #  handle the last 3 params manually
        alaw, a, b = params_list[-3:]


        d = UserDBTableAction.createEntryEditDialog(self, others)
        d.getEditorByName(HEADERS[FORMULA]).SetEditable(False)

        # create the controls for the activity law and its parameters
        self._radiobox = rb = wx.RadioBox(d, -1, "law type", wx.DefaultPosition, wx.DefaultSize,
                ACTIVITY_LAWS , 1, wx.RA_SPECIFY_COLS)
        rb.param = alaw
        rb.Bind(wx.EVT_RADIOBOX, self.updateRadioBox)
        rb.SetSelection(ACTIVITY_LAWS.index(alaw.getValue()))

        self._coefa = coefa = wx.TextCtrl(d, -1, str(a.getValue()), validator=ParameterValidator(a) )
        self._coefb = coefb = wx.TextCtrl(d, -1, str(b.getValue()), validator=ParameterValidator(b) )


        self.updateRadioBox() #now we can update all

        # layout... gui .....

        d.addToGrid( wx.StaticText(d, -1, "Activity Law"), 0  )

        box = wx.BoxSizer(wx.HORIZONTAL)
        box.Add(rb)

        coef_box = wx.StaticBoxSizer(wx.StaticBox(d, -1, "Debye Huckel Coefficients"), wx.VERTICAL )
        flag= wx.ALIGN_CENTER_VERTICAL|wx.EXPAND
        abox = wx.BoxSizer(wx.HORIZONTAL)
        abox.Add(wx.StaticText(d,-1,"a"))
        abox.Add(coefa, flag=flag)
        coef_box.Add(abox, flag=flag)

        bbox = wx.BoxSizer(wx.HORIZONTAL)
        bbox.Add(wx.StaticText(d,-1,"b"))
        bbox.Add(coefb, flag=flag)
        coef_box.Add( bbox, flag=flag )

        box.Add( coef_box, proportion=1, flag=wx.EXPAND|wx.ALL )
        d.addToGrid( box, 1 )

        d.Fit()
        return d
 def createEntryEditDialog(self, params_list):
     d = UserDBTableAction.createEntryEditDialog(self, params_list)
     d.getEditorByName(HEADERS[FORMULA]).SetEditable(False)
     return d
    def __init__(self, win, params_mgr):
        CommonUserDBTableModel.__init__(self, HEADERS, ORDER)

        UserDBTableAction.__init__(self, params_mgr, win, "Aqueous Secondary Species",
                              "add and edit custom Aqueous secondary species (SOLUTION_SPECIES)", self,
                    help=HELP)
示例#13
0
    def __init__(self, win, params_mgr):
        CommonUserDBTableModel.__init__(self, HEADERS, ORDER)

        UserDBTableAction.__init__(self, params_mgr, win, "Materials",
                              "To edit and add custom Materials ", self,
                    help=HELP)
示例#14
0
    def __init__(self, win, params_mgr):
        CommonUserDBTableModel.__init__(self, HEADERS, ORDER)

        UserDBTableAction.__init__(self, params_mgr, win, "Mineral Phases",
                              "Add and Edit custom mineral phases (PHASES)", self,
                    help=HELP)
示例#15
0
 def __init__(self, win, params_mgr):
     CommonUserDBTableModel.__init__(self, HEADERS, ORDER)
     UserDBTableAction.__init__(self, params_mgr, win, "Exchange Master Species",
                           "add and edit custom exchange sites (EXCHANGE_MASTER_SPECIES)", self,
                 help=HELP)
示例#16
0
 def _createTable(self, parent):
     table = UserDBTableAction._createTable(self, parent)
     table.SetColumnWidth(1, 100)
     return table
示例#17
0
 def __init__(self, win, params_mgr):
     CommonUserDBTableModel.__init__(self, HEADERS, ORDER)
     UserDBTableAction.__init__(self, params_mgr, win, "Surface Complexation Species",
                           "add and edit custom Surface Species (SURFACE_SPECIES)", self,
                 help=HELP)
示例#18
0
 def createEntryEditDialog(self, params_list):
     d = UserDBTableAction.createEntryEditDialog(self, params_list)
     d.getEditorByName(HEADERS[FORMULA]).SetEditable(False)
     return d
示例#19
0
    def __init__(self, win, params_mgr):

        CommonUserDBTableModel.__init__(self, HEADERS, ORDER)

        UserDBTableAction.__init__(self, params_mgr, win, "Aqueous Master Species",
                              "add and edit custom Aqueous master species", self, help=HELP)
示例#20
0
 def _createTable(self, parent):
     table = UserDBTableAction._createTable(self, parent)
     table.SetColumnWidth(1, 100)
     return table