def __init__(self, main_window):
        self.dialog = QDialog(main_window.window)
        self.ui = qt_techs.Ui_Dialog()
        self.ui.setupUi(self.dialog)
        self.main_window = main_window

        self.assets = main_window.assets
        self.player = main_window.player

        self.selected_tech = None

        self.ui.tech_list.currentItemChanged.connect(lambda: self.set_select(self.ui.tech_list))
        self.ui.tech_list.itemDoubleClicked.connect(self.add_tech)
        self.ui.known_list.currentItemChanged.connect(lambda: self.set_select(self.ui.known_list))
        self.ui.known_list.itemDoubleClicked.connect(self.remove_tech)

        self.techs = [None, None, None, None]
        self.equip = [None, None, None, None]

        self.populate_equipped()

        self.ui.toggle_button.clicked.connect(self.toggle_tech)
        self.ui.add_button.clicked.connect(self.add_tech)
        self.ui.remove_button.clicked.connect(self.remove_tech)
        self.ui.unlock_button.clicked.connect(self.learn_all_techs)

        self.ui.icon1_clear.clicked.connect(lambda: self.clear_tech(0))
        self.ui.icon2_clear.clicked.connect(lambda: self.clear_tech(1))
        self.ui.icon3_clear.clicked.connect(lambda: self.clear_tech(2))
        self.ui.icon4_clear.clicked.connect(lambda: self.clear_tech(3))

        self.ui.icon1_button.clicked.connect(lambda: self.set_tech(0))
        self.ui.icon2_button.clicked.connect(lambda: self.set_tech(1))
        self.ui.icon3_button.clicked.connect(lambda: self.set_tech(2))
        self.ui.icon4_button.clicked.connect(lambda: self.set_tech(3))

        self.update_lists()
        self.ui.tech_list.setFocus()
        if self.ui.tech_list.count() > 0:
            self.ui.tech_list.setCurrentRow(0)
        else:
            self.ui.known_list.setCurrentRow(0)
dataset/ETHPy150Open wizzomafizzo/starcheat/starcheat/gui/techs.py/Techs.__init__/original