harmonicinterval.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:Solfege 作者: RannyeriDev 项目源码 文件源码
def __init__(self, teacher):
        abstract.IntervalGui.__init__(self, teacher)
        self.g_test_stat_dlg = None
        ################
        # practice_box #
        ################
        self.std_buttons_add(
            ('repeat_melodic', self.repeat_melodic),
            ('give_up', self.give_up),
        )
        ##############
        # config_box #
        ##############
        self.g_ask_for_frame = frame = Gtk.Frame(label=_("Ask for these intervals"))
        self.config_box.pack_start(frame, False, False, 0)

        self.g_interval_selector = nIntervalCheckBox(self.m_exname, 'intervals')

        def _ff(var):
            if self.m_t.m_custom_mode:
                # If we are running in custom mode, then the user can
                # select himself what intervals to practise. And then
                # we have to reset the exercise.
                self.on_end_practise()
                self.on_start_practise()
        self.add_watch('intervals', _ff)
        self.g_interval_selector.set_border_width(gu.PAD)
        frame.add(self.g_interval_selector)

        self.add_lock_to_key_gui()
        #------we need some space
        self.config_box.pack_start(Gtk.HBox(), False, False,
                                   padding=gu.PAD_SMALL)
        # ------------------------------------------
        self._add_auto_new_question_gui(self.config_box)
        # ----------------------------------------------
        self._create_select_inputwidget_gui()
        # ------------ frame -------------------
        self.config_box.set_spacing(0)
        self.config_box.show_all()
        ##############
        # statistics #
        ##############
        self.setup_statisticsviewer(statisticsviewer.StatisticsViewer,
                                   _("Harmonic interval"))
        self.select_inputwidget()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号