Esempio n. 1
0
    def _createUI(self, padx, pady) -> None:
        r = c = 0
        lf = ttk.Frame(self)
        lf.grid(column=c, row=r, sticky='nswe', padx=10, pady=10)

        ########### Wohnung and Year header  #######################
        col = 1
        for i in range(self._nWhg):
            ident = self._jdcoll_list[i].getWohnungIdent()
            col_span = self._nYears
            lbl = MyLabel(lf,
                          text=ident,
                          column=col,
                          row=r,
                          sticky='nwe',
                          anchor='center',
                          padx=padx,
                          pady=pady)
            lbl.grid(columnspan=col_span)
            col += col_span

        r += 1
        col = 1
        for n in range(self._nWhg):
            for i in range(self._nYears):
                year = str(self._yearlist[i])
                lbl = MyLabel(lf,
                              text=year,
                              column=col,
                              row=r,
                              sticky='swe',
                              anchor='center',
                              padx=padx,
                              pady=pady)
                lbl['style'] = 'year.TLabel'
                col += 1

        r += 1
        ####regelmäßige Ein-/Auszahlungen##############
        lbl = MyLabel(lf,
                      text='Regelmäßige\nEin-/Auszahlungen',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=1,
                      pady=pady)
        lbl['style'] = 'fat.TLabel'

        r += 1
        lbl = MyLabel(lf,
                      text='Nettomiete',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.nettomiete, r, pady)

        r += 1
        lbl = MyLabel(lf,
                      text='NK-Voraus',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.nk_voraus, r, pady)

        r += 1
        lbl = MyLabel(lf,
                      text='HG-Voraus',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.hg_voraus, r, pady)

        r += 1
        ####### sonstige Ein-/Auszahlungen ################
        lbl = MyLabel(lf,
                      text='Sonstige\nEin-/Auszahlungen',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=1,
                      pady=(20, pady))
        lbl['style'] = 'fat.TLabel'

        r += 1
        lbl = MyLabel(lf,
                      text='Rechnungen und\nEntnahme Rücklagen',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.rechng, r, 10)

        r += 1
        lbl = MyLabel(lf,
                      text='sonst. Kosten',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.sonst_kosten, r, pady)

        r += 1
        lbl = MyLabel(lf,
                      text='NK-Abrechnung',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.nk_abrechng, r, pady)

        r += 1
        lbl = MyLabel(lf,
                      text='HG-Abrechnung',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.hg_abrechng, r, pady)

        r += 1
        ###### Ergebnis ###################
        py = (25, 0)
        lbl = MyLabel(lf,
                      text='Ergebnis',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=1,
                      pady=py)
        lbl['style'] = 'bigfat.TLabel'
        #self._rowList.append((r, 22))
        self._createOut(lf, Vergleichswert.ergebnis, r, py)

        r += 1
        #########  Sonderumlagen #####################
        py = (15, 0)
        lbl = MyLabel(lf,
                      text='Sonderumlagen',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=1,
                      pady=py)
        lbl['style'] = 'fat.TLabel'
        self._createOut(lf, Vergleichswert.sonderumlage, r, py)

        r += 1
        #########  Ein-/Auszahlungen je qm #####################
        py = (15, 3)
        lbl = MyLabel(lf,
                      text='Ein-/Auszahlungen\nje qm u. Monat',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=1,
                      pady=py)
        lbl['style'] = 'fat.TLabel'

        r += 1
        lbl = MyLabel(lf,
                      text='Nettomiete',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.nettomiete_qm, r, pady)

        r += 1
        lbl = MyLabel(lf,
                      text='NK',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.nk_qm, r, pady)

        r += 1
        lbl = MyLabel(lf,
                      text='HG gesamt',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.hg_ges_qm, r, pady)

        r += 1
        lbl = MyLabel(lf,
                      text='davon Rücklagen',
                      column=c,
                      row=r,
                      sticky='nw',
                      anchor='w',
                      padx=padx,
                      pady=pady)
        self._createOut(lf, Vergleichswert.rueck_qm, r, pady)

        if self._nWhg > 1:
            col = self._nYears
            for n in range(self._nWhg - 1):
                ttk.Separator(lf, orient=VERTICAL).\
                    grid(column=col, row=0, rowspan=r+1, sticky='nse')
                col += self._nYears

        self._outputLabelframe = lf
Esempio n. 2
0
    def _createAllgemeinFrame(self, row, padx, pady):
        lf = ttk.Labelframe(self,
                            text='Allgemeine Daten',
                            style='my.TLabelframe')
        lf.grid(column=0,
                row=row,
                sticky='nswe',
                padx=padx,
                pady=(pady + 8, pady))

        ### Combo und Label für Etage
        col = 0
        cbo = MyCombobox(lf)
        cbo.setItems((1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))
        cbo.setWidth(3)
        cbo.registerModifyCallback(self._onModified)
        cbo.grid(column=col, row=0, sticky='nswe', padx=padx, pady=pady)

        col += 1
        self._cboEtage = cbo
        MyLabel(lf, '. Etage', col, 0, 'nswe', 'w', (0, padx), pady)

        #### Entry und Label für qm
        col += 1
        ie = IntEntry(lf)
        ie.setWidth(3)
        ie.registerModifyCallback(self._onModified)
        ie.grid(column=col, row=0, sticky='nswe', padx=padx, pady=pady)
        self._ieQm = ie

        col += 1
        lbl = MyLabel(lf, 'qm', col, 0, 'nswe', 'w', (0, padx), pady)

        ### Combo und Label für Zimmer
        col += 1
        cbo = MyCombobox(lf)
        cbo.setItems((1, 1.5, 2, 2.5, 3, 3.5, 4, 5))
        cbo.setIndex(2)
        cbo.setWidth(3)
        cbo.registerModifyCallback(self._onModified)
        cbo.grid(column=col, row=0, sticky='nswe', padx=padx, pady=pady)
        self._cboZimmer = cbo

        col += 1
        MyLabel(lf, 'Zimmer', col, 0, 'nswe', 'w', (0, padx), pady)

        ### Entry und Label für Anteile
        col += 1
        ie = IntEntry(lf)
        ie.setWidth(3)
        ie.grid(column=col, row=0, sticky='nswe', padx=padx, pady=pady)
        ie.registerModifyCallback(self._onModified)
        self._ieAnteil = ie

        col += 1
        MyLabel(lf, 'Anteile am Gesamtobjekt', col, 0, 'nswe', 'w', (0, padx),
                pady)

        ### neue Zeile
        ### Checkbutton für Aufzug
        col = 0
        cb = ttk.Checkbutton(lf,
                             text='Aufzug im Haus',
                             variable=self._ivarAufzug)
        cb.grid(column=col,
                row=1,
                columnspan=2,
                sticky='nswe',
                padx=padx,
                pady=pady)
        self._cbAufzug = cb

        ### neue Zeile
        ### Label und Entry für IBAN
        col = 0
        lbl = MyLabel(lf, 'IBAN der WEG ', 0, 2, 'nswe', 'w', padx, pady)
        lbl.grid(columnspan=2)

        col += 2
        te = TextEntry(lf, col, 2, 'nswe', (padx), pady)
        te.registerModifyCallback(self._onModified)
        te.grid(columnspan=5)
        self._teIbanWEG = te