heat_transfer_gui.py
def add_algorithm_choice(self,
                             parent_layout,
                             specified_algorithm: str = None) -> None:
        """
        Including the radio buttons for user to choose the algorithm

        Args:
            parent_layout ... into which layout we should include everything
            specified_algorithm ... if some algorithm is already chosen
        """

        self.algorithmlayout = QHBoxLayout()

        label = QLabel("Algorithm choice:")
        label.setFont(QFont("Times", 15, QFont.Bold))

        self.radio_choice_classic = QRadioButton("Classic")
        self.radio_choice_inverse = QRadioButton("Inverse")

        # Seeing which algorithm should be checked (useful when rerendering the inputs)
        if specified_algorithm is None or specified_algorithm == "classic":
            self.radio_choice_classic.setChecked(True)
        else:
            self.radio_choice_inverse.setChecked(True)

        # Listening for changes in the choice of algorithm
        # TODO: with more than 2 algorithms all would need to listen
        self.radio_choice_classic.toggled.connect(lambda: self.change_user_input())

        self.algorithmlayout.addWidget(label)
        self.algorithmlayout.addWidget(self.radio_choice_classic)
        self.algorithmlayout.addWidget(self.radio_choice_inverse)

        parent_layout.addLayout(self.algorithmlayout)

        Including the radio buttons for user to choose the algorithm

        Args:
            parent_layout ... into which layout we should include everything
            specified_algorithm ... if some algorithm is already chosen
        
Including the radio buttons for user to choose the algorithm
Args:
parent_layout ... into which layout we should include everything
specified_algorithm ... if some algorithm is already chosen
Including the radio buttons for user to choose the algorithm Args : parent_layout ... into which layout we should include everything specified_algorithm ... if some algorithm is already chosen
def add_algorithm_choice(self,
                             parent_layout,
                             specified_algorithm: str = None) -> None:
        self.algorithmlayout = QHBoxLayout()
        label = QLabel("Algorithm choice:")
        label.setFont(QFont("Times", 15, QFont.Bold))
        self.radio_choice_classic = QRadioButton("Classic")
        self.radio_choice_inverse = QRadioButton("Inverse")
        if specified_algorithm is None or specified_algorithm == "classic":
            self.radio_choice_classic.setChecked(True)
        else:
            self.radio_choice_inverse.setChecked(True)
        self.radio_choice_classic.toggled.connect(lambda: self.change_user_input())
        self.algorithmlayout.addWidget(label)
        self.algorithmlayout.addWidget(self.radio_choice_classic)
        self.algorithmlayout.addWidget(self.radio_choice_inverse)
        parent_layout.addLayout(self.algorithmlayout)
def add_algorithm_choice ( self , parent_layout , specified_algorithm : str = None ) -> None : self . algorithmlayout = QHBoxLayout ( ) label = QLabel ( "Algorithm choice:" ) label . setFont ( QFont ( "Times" , 15 , QFont . Bold ) ) self . radio_choice_classic = QRadioButton ( "Classic" ) self . radio_choice_inverse = QRadioButton ( "Inverse" ) if specified_algorithm is None or specified_algorithm == "classic" : self . radio_choice_classic . setChecked ( True ) else : self . radio_choice_inverse . setChecked ( True ) self . radio_choice_classic . toggled . connect ( lambda : self . change_user_input ( ) ) self . algorithmlayout . addWidget ( label ) self . algorithmlayout . addWidget ( self . radio_choice_classic ) self . algorithmlayout . addWidget ( self . radio_choice_inverse ) parent_layout . addLayout ( self . algorithmlayout )
Including the radio buttons for user to choose the algorithm
Args:
parent_layout ... into which layout we should include everything
specified_algorithm ... if some algorithm is already chosen
Including the radio buttons for user to choose the algorithm Args : parent_layout ... into which layout we should include everything specified_algorithm ... if some algorithm is already chosen
"""
        Including the radio buttons for user to choose the algorithm

        Args:
            parent_layout ... into which layout we should include everything
            specified_algorithm ... if some algorithm is already chosen
        """ # Seeing which algorithm should be checked (useful when rerendering the inputs) # Listening for changes in the choice of algorithm # TODO: with more than 2 algorithms all would need to listen
self
parent_layout
specified_algorithm
str