def __init__(self, janela, linha, pading, lista_d_items, **kwargs):
        super().__init__(janela, bg='red', **kwargs)

        self.check_caixa = BaseCheckBox(self)
        self.check_caixa.grid(row=linha, column=0)

        self.menu_de_items = BaseDropdownMenu(self, lista_d_items)
        self.menu_de_items.grid(row=linha, column=1, padx=(25, 20))

        self.menu_de_quantidade = BaseDropdownMenuForQuant(self)
        self.menu_de_quantidade.grid(row=linha, column=2)

        self.grid(pady=pading, columnspan=3)

        self.check_caixa.chek_var.trace_add('write', self.grey_out_elements)
    def __init__(self, janela, linha, pading, lista_d_items, var_nome, preco,
                 **kwargs):
        super().__init__(janela, bd=1, relief='raised', **kwargs)

        self.preco = preco

        self.check_box = BaseCheckBox(self)
        self.check_box.grid(row=linha, column=0)

        self.menu_de_items = BaseDropdownMenu(self, lista_d_items)
        self.menu_de_items.grid(row=linha, column=1, padx=(15, 15))

        self.menu_de_quantidade = BaseDropdownMenuForQuant(self, var_nome)
        self.menu_de_quantidade.grid(row=linha, column=2)

        self.grid(pady=pading, columnspan=3)

        self.check_box.check_var.trace_add('write', self.grey_out_elements)

        self.added_value = 0
        self.previous_quant = self.get_quant_from_quantmenu()
    def __init__(self, janela, linha, nome_marmita, **kwargs):
        super().__init__(janela, **kwargs)
        self.config(bg=None, bd=1, relief='raised')

        self.check_box = BaseCheckBox(self)
        self.check_box.grid(row=linha, column=0)

        self.menu_quant = BaseDropdownMenuForQuant(self)
        self.menu_quant.grid(row=linha, column=1, padx=(15, 10))

        self.label_marmita = Label(
            self,
            text=nome_marmita,
            font=("SourceSansPro", 11),
            width=10,
        )
        self.label_marmita.grid(row=linha, column=2)

        self.grid(pady=(20, 0))

        self.check_box.chek_var.trace_add('write', self.grey_out_elements)
class BebidasFrames(Frame):
    def __init__(self, janela, linha, pading, lista_d_items, **kwargs):
        super().__init__(janela, bg='red', **kwargs)

        self.check_caixa = BaseCheckBox(self)
        self.check_caixa.grid(row=linha, column=0)

        self.menu_de_items = BaseDropdownMenu(self, lista_d_items)
        self.menu_de_items.grid(row=linha, column=1, padx=(25, 20))

        self.menu_de_quantidade = BaseDropdownMenuForQuant(self)
        self.menu_de_quantidade.grid(row=linha, column=2)

        self.grid(pady=pading, columnspan=3)

        self.check_caixa.chek_var.trace_add('write', self.grey_out_elements)

    # TODO: esse metodo, assim como o trace_add acima, ta estranho. arruma dps
    def grey_out_elements(self, *args):
        check_buton_state = self.check_caixa.chek_var.get()

        if check_buton_state == "sim":
            self.menu_de_items.config(state=NORMAL)
            self.menu_de_quantidade.config(state=NORMAL)

        else:
            self.menu_de_items.config(state=DISABLED)
            self.menu_de_quantidade.config(state=DISABLED)
class MarmitasFrames(Frame):
    def __init__(self, janela, linha, nome_marmita, **kwargs):
        super().__init__(janela, **kwargs)
        self.config(bg=None, bd=1, relief='raised')

        self.check_box = BaseCheckBox(self)
        self.check_box.grid(row=linha, column=0)

        self.menu_quant = BaseDropdownMenuForQuant(self)
        self.menu_quant.grid(row=linha, column=1, padx=(15, 10))

        self.label_marmita = Label(
            self,
            text=nome_marmita,
            font=("SourceSansPro", 11),
            width=10,
        )
        self.label_marmita.grid(row=linha, column=2)

        self.grid(pady=(20, 0))

        self.check_box.chek_var.trace_add('write', self.grey_out_elements)

    # TODO: esse metodo, assim como o trace_add acima, ta estranho. arruma dps
    def grey_out_elements(self, *args):
        check_buton_state = self.check_box.chek_var.get()

        if check_buton_state == "sim":
            self.menu_quant.config(state=NORMAL)

        else:
            self.menu_quant.config(state=DISABLED)
    def __init__(self, janela, linha, nome_marmita, var_nome, preco, **kwargs):
        super().__init__(janela, **kwargs)
        self.config(bd=1, relief='raised')

        self.preco = preco

        self.check_box = BaseCheckBox(self)
        self.check_box.grid(row=linha, column=0)

        self.menu_de_quantidade = BaseDropdownMenuForQuant(self, var_nome)
        self.menu_de_quantidade.grid(row=linha, column=1, padx=(15, 10))

        self.label_marmita = Label(self,
                                   text=nome_marmita,
                                   font=("SourceSansPro", 11),
                                   width=10,
                                   state=DISABLED)
        self.label_marmita.grid(row=linha, column=2)

        # TODO: this 'if' is kinda garbage, find better solution
        if not "FEIJOADA" in nome_marmita and today == "Saturday":
            self.check_box_feijoada = BaseCheckBox(self,
                                                   bd=1,
                                                   relief='raised',
                                                   state=DISABLED,
                                                   text="+Feij.")
            self.check_box_feijoada.grid(row=linha, column=3, padx=(10, 10))

            self.check_box_feijoada.add_trace(self.add_feijoada_value)

        # TODO: this is totaly temporary, i'll find a better solution
        if not ("FEIJOADA" in nome_marmita and today != "Saturday"):
            self.grid(pady=(20, 0))

        self.check_box.check_var.trace_add('write', self.grey_out_elements)

        self.added_value = 0.0
        self.previous_quant = self.get_quant_from_quantmenu()
class BebidasFrames(Frame, CommonMethodsBebidasMarmitas):
    def __init__(self, janela, linha, pading, lista_d_items, var_nome, preco,
                 **kwargs):
        super().__init__(janela, bd=1, relief='raised', **kwargs)

        self.preco = preco

        self.check_box = BaseCheckBox(self)
        self.check_box.grid(row=linha, column=0)

        self.menu_de_items = BaseDropdownMenu(self, lista_d_items)
        self.menu_de_items.grid(row=linha, column=1, padx=(15, 15))

        self.menu_de_quantidade = BaseDropdownMenuForQuant(self, var_nome)
        self.menu_de_quantidade.grid(row=linha, column=2)

        self.grid(pady=pading, columnspan=3)

        self.check_box.check_var.trace_add('write', self.grey_out_elements)

        self.added_value = 0
        self.previous_quant = self.get_quant_from_quantmenu()

    # TODO: esse metodo, assim como o trace_add acima, ta estranho. arruma dps
    def grey_out_elements(self, *args):
        check_buton_state = self.check_box.check_var.get()
        self.update_value_label()

        if check_buton_state == "sim":
            self.menu_de_items.config(state=NORMAL)
            self.menu_de_quantidade.config(state=NORMAL)

        else:
            self.menu_de_items.config(state=DISABLED)
            self.menu_de_quantidade.config(state=DISABLED)

    def reset_values(self):
        if self.menu_de_items.get_current_value(
        ) != self.menu_de_items.opcoes[0]:
            self.menu_de_items.current_value.set(self.menu_de_items.opcoes[0])

        if self.get_quant_from_quantmenu() > 1:
            self.menu_de_quantidade.set_current_value(1)

        if self.get_checkbox_state() == "sim":
            self.check_box.deselect()
class MarmitasFrames(Frame, CommonMethodsBebidasMarmitas):
    def __init__(self, janela, linha, nome_marmita, var_nome, preco, **kwargs):
        super().__init__(janela, **kwargs)
        self.config(bd=1, relief='raised')

        self.preco = preco

        self.check_box = BaseCheckBox(self)
        self.check_box.grid(row=linha, column=0)

        self.menu_de_quantidade = BaseDropdownMenuForQuant(self, var_nome)
        self.menu_de_quantidade.grid(row=linha, column=1, padx=(15, 10))

        self.label_marmita = Label(self,
                                   text=nome_marmita,
                                   font=("SourceSansPro", 11),
                                   width=10,
                                   state=DISABLED)
        self.label_marmita.grid(row=linha, column=2)

        # TODO: this 'if' is kinda garbage, find better solution
        if not "FEIJOADA" in nome_marmita and today == "Saturday":
            self.check_box_feijoada = BaseCheckBox(self,
                                                   bd=1,
                                                   relief='raised',
                                                   state=DISABLED,
                                                   text="+Feij.")
            self.check_box_feijoada.grid(row=linha, column=3, padx=(10, 10))

            self.check_box_feijoada.add_trace(self.add_feijoada_value)

        # TODO: this is totaly temporary, i'll find a better solution
        if not ("FEIJOADA" in nome_marmita and today != "Saturday"):
            self.grid(pady=(20, 0))

        self.check_box.check_var.trace_add('write', self.grey_out_elements)

        self.added_value = 0.0
        self.previous_quant = self.get_quant_from_quantmenu()

    # TODO: esse metodo, assim como o trace_add acima, ta estranho. arruma dps
    def grey_out_elements(self, *args):
        check_buton_state = self.check_box.check_var.get()

        self.update_value_label()

        if check_buton_state == "sim":
            self.menu_de_quantidade.config(state=NORMAL,
                                           bg='#ccffcc',
                                           highlightbackground='#ccffcc')

            self.label_marmita.config(state=NORMAL, bg='#ccffcc')

            if hasattr(self, 'check_box_feijoada'):
                self.check_box_feijoada.config(state=NORMAL, bg='#ccffcc')

            self.config(bg='#ccffcc')

        else:
            self.menu_de_quantidade.config(state=DISABLED,
                                           bg="#f0f0f0",
                                           highlightbackground='#f0f0f0')
            self.label_marmita.config(state=DISABLED, bg="#f0f0f0")

            if hasattr(self, 'check_box_feijoada'):
                self.check_box_feijoada.config(state=DISABLED, bg="#f0f0f0")

            self.config(bg="#f0f0f0")

    def reset_values(self):
        if self.get_checkbox_state() == "nao":
            self.check_box.select()

        if hasattr(self, 'check_box_feijoada'
                   ) and self.check_box_feijoada.get_state() == "sim":
            self.check_box_feijoada.deselect()

        if self.get_quant_from_quantmenu() > 1:
            self.menu_de_quantidade.current_value.set(1)

        self.check_box.deselect()

    def add_feijoada_value(self, *args):
        val = self.get_quant_from_quantmenu() * 2.0

        if self.check_box_feijoada.get_state() == "sim":
            self.preco += 2.0

            self.value_var_to_update.set(self.value_var_to_update.get() + val)
            self.added_value += val
        else:
            self.preco -= 2.0

            self.value_var_to_update.set(self.value_var_to_update.get() - val)
            self.added_value -= val