def __init__(self, *args, **kwds): WxHelpers.__init__(self) Helpers.__init__(self) # begin wxGlade: CalcFeeDialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.l_validfromdate = wx.StaticText(self, -1, _("Ruling valid from")) self.validfromdate = wx.DatePickerCtrl(self, -1) self.l_receiver = wx.StaticText(self, -1, _("Receiver")) self.receiver = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_TAB | wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH) self.l_income = wx.StaticText(self, -1, _("Underlying income")) self.l_calcfee = wx.StaticText(self, -1, _("Individual calculation")) self.l_notes = wx.StaticText(self, -1, _("Notes")) self.notes = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE) self.b_ok = wx.Button(self, wx.ID_OK, "") self.b_cancel = wx.Button(self, wx.ID_CANCEL, "") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnOK, self.b_ok) # end wxGlade self.olv_income = olv(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER) self.__initOLVIncome() self.olv_calcfee = olv(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER) self.__initOLVCalcFee() self.__do_layout_noglade() pub.subscribe(self.Populate, 'dialog.calcfee.populate') #@UndefinedVariable
def __init__(self): ''' Constructor ''' Helpers.__init__(self) self.adult = defaultdict(dict) self.child = defaultdict(dict) self.totalincome = 0 self.lenAdults = 0 self.hhsize = 0 self.reduction2 = 0 self.payer = None
def __init__(self, parent, *params): ''' Instantiates the Listview and initializes object-wide variables ''' super(ListView, self).__init__(parent, style = wx.LC_REPORT) # Extend the last column automatically listmix.ListCtrlAutoWidthMixin.__init__(self) # ALternate colors self.evenRowsBackColor = wx.Colour(240, 248, 255) # ALICE BLUE self.oddRowsBackColor = wx.Colour(255, 250, 205) # LEMON CHIFFON listmix.ListRowHighlighter.__init__(self) # Helper methods Helpers.__init__(self) # Bind for sorting self.Bind(wx.EVT_LIST_COL_CLICK, self.OnColumnClick) self.colnum = 0 # Maps from column name to column number self.colnames = {} # Maps from column number to column name self.colnumbers = {} # Columns to be converted to string self.strConvCols = {} # Columns to contain images self.imgCols = {} # Item data mapping self.itemDataMap = {} # Item to object id mapping self.itemObjectID = {} # Store data dict objects self.id2obj_dict = {} # Windows definitely treats the first column differently. # One workaround is to create an empty column 0 and hide it self.InsertColumn(self.colnum, '', width=1) self.colnames['dummy'] = self.colnum self.colnumbers[self.colnum] = 'dummy' self.colnum += 1 # catch resize event self.Bind(wx.EVT_LIST_COL_BEGIN_DRAG, self.OnColDrag)
def __init__(self, *args, **kwds): WxHelpers.__init__(self) Helpers.__init__(self) # begin wxGlade: EditAdultFrame.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.FULL_REPAINT_ON_RESIZE | wx.CLIP_CHILDREN wx.Frame.__init__(self, *args, **kwds) self.panel_2 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL) self.l_name = wx.StaticText(self.panel_2, -1, _("Name, First name")) self.name = wx.TextCtrl(self.panel_2, ID_NA, "") self.firstname = wx.TextCtrl(self.panel_2, ID_FI, "") self.l_street = wx.StaticText(self.panel_2, -1, _("Street, No.")) self.street = wx.TextCtrl(self.panel_2, ID_ST, "") self.number = wx.TextCtrl(self.panel_2, ID_NU, "") self.l_city = wx.StaticText(self.panel_2, -1, _("Postcode, city")) self.postcode = wx.TextCtrl(self.panel_2, ID_PO, "") self.city = wx.TextCtrl(self.panel_2, ID_CI, "") self.staff = wx.CheckBox(self.panel_2, -1, _("Staff")) self.organization = wx.CheckBox(self.panel_2, -1, _("Organization member")) self.sizer_5_copy_staticbox = wx.StaticBox(self.panel_2, -1, _("State")) self.l_householdsize = wx.StaticText(self.panel_2, -1, _("Household size")) self.householdsize = wx.TextCtrl(self.panel_2, ID_HS, "") self.l_fonnumber = wx.StaticText(self.panel_2, -1, _("Number")) self.fonnumber = wx.TextCtrl(self.panel_2, ID_TC, "") self.l_fontype = wx.StaticText(self.panel_2, -1, _("Type")) self.fontype = wx.ComboBox(self.panel_2, ID_CB, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.b_newfon = wx.Button(self.panel_2, -1, _("&New")) self.b_deletefon = wx.Button(self.panel_2, -1, _("Delete")) self.lv_fonnumbers = ListView(self.panel_2, -1) self.sizer_37_staticbox = wx.StaticBox(self.panel_2, -1, _("Telephone")) self.l_email = wx.StaticText(self.panel_2, -1, _("Address")) self.email = wx.TextCtrl(self.panel_2, ID_TC1, "") self.label_4_copy = wx.StaticText(self.panel_2, -1, _("Note")) self.emailnote = wx.TextCtrl(self.panel_2, ID_TC2, "") self.b_newemail = wx.Button(self.panel_2, -1, _("&New")) self.b_deleteemail = wx.Button(self.panel_2, -1, _("Delete")) self.lv_email = ListView(self.panel_2, -1) self.sizer_38_staticbox = wx.StaticBox(self.panel_2, -1, _("E-Mail")) self.l_income = wx.StaticText(self.panel_2, -1, _("Income")) self.income = wx.TextCtrl(self.panel_2, ID_TC3, "") self.l_incometype = wx.StaticText(self.panel_2, -1, _("Type")) self.incometype = wx.ComboBox(self.panel_2, ID_CB1, choices=[], style=wx.CB_DROPDOWN) self.b_newincome = wx.Button(self.panel_2, -1, _("&New")) self.b_deleteincome = wx.Button(self.panel_2, -1, _("Delete")) self.lv_income = ListView(self.panel_2, -1) self.sizer_39_staticbox = wx.StaticBox(self.panel_2, -1, _("Income")) self.b_ok = wx.Button(self.panel_2, wx.ID_OK, "") self.btn_Apply = wx.Button(self.panel_2, wx.ID_APPLY, "") self.b_cancel = wx.Button(self.panel_2, wx.ID_CANCEL, "") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT, self.OnChanged, id=ID_NA) self.Bind(wx.EVT_TEXT, self.OnChanged, id=ID_FI) self.Bind(wx.EVT_TEXT, self.OnChanged, id=ID_ST) self.Bind(wx.EVT_TEXT, self.OnChanged, id=ID_NU) self.Bind(wx.EVT_TEXT, self.OnChanged, id=ID_PO) self.Bind(wx.EVT_TEXT, self.OnChanged, id=ID_CI) self.Bind(wx.EVT_CHECKBOX, self.OnChanged, self.staff) self.Bind(wx.EVT_CHECKBOX, self.OnChanged, self.organization) self.Bind(wx.EVT_TEXT, self.OnChanged, id=ID_HS) self.Bind(wx.EVT_TEXT, self.OnRefreshFon, id=ID_TC) self.Bind(wx.EVT_COMBOBOX, self.OnRefreshFon, id=ID_CB) self.Bind(wx.EVT_BUTTON, self.OnNewFon, self.b_newfon) self.Bind(wx.EVT_BUTTON, self.OnDeleteFon, self.b_deletefon) self.Bind(wx.EVT_TEXT, self.OnRefreshEmail, id=ID_TC1) self.Bind(wx.EVT_TEXT, self.OnRefreshEmail, id=ID_TC2) self.Bind(wx.EVT_BUTTON, self.OnNewEmail, self.b_newemail) self.Bind(wx.EVT_BUTTON, self.OnDeleteEmail, self.b_deleteemail) self.Bind(wx.EVT_TEXT, self.OnRefreshIncome, id=ID_TC3) self.Bind(wx.EVT_COMBOBOX, self.OnRefreshIncome, id=ID_CB1) self.Bind(wx.EVT_BUTTON, self.OnNewIncome, self.b_newincome) self.Bind(wx.EVT_BUTTON, self.OnDeleteIncome, self.b_deleteincome) self.Bind(wx.EVT_BUTTON, self.OnOK, self.b_ok) self.Bind(wx.EVT_BUTTON, self.OnApply, self.btn_Apply) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.b_cancel) # end wxGlade self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelectedFonnumbers, self.lv_fonnumbers) self.__initLVFonnumbers() self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelectedEmail, self.lv_email) self.__initLVEmail() self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelectedIncome, self.lv_income) self.__initLVIncome() self.SetExtraStyle(wx.WS_EX_VALIDATE_RECURSIVELY) self.obj = None self.positions = None self.fonnumberobject = None self.emails = None self.incomeobject = None # Register PubSub Listener pub.subscribe(self.Populate, 'dialog.populate.adult') #@UndefinedVariable pub.subscribe(self.fill_comboboxes, 'editadultframe.fillcomboboxes') #@UndefinedVariable # Persistence self.SetName('EditParentFrame') self._persistMgr = PM.PersistenceManager.Get() wx.CallAfter(self.__register) self.Bind(wx.EVT_CLOSE, self.OnClose) # Call this method when a value is edited in the frame self.__edited(False) # Ignore events when resetting the widgets self._clearing = False
def __init__(self): ''' Constructor ''' Helpers.__init__(self) wx.PyValidator.__init__(self)
def __init__(self): ''' Constructor ''' Helpers.__init__(self)