wb_scm_project_dialogs.py 文件源码

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

项目:scm-workbench 作者: barry-scott 项目源码 文件源码
def __init__( self, wizard_state ):
        super().__init__()

        self.wizard_state = wizard_state

        self.setTitle( T_('Add Project') )
        self.setSubTitle( T_('Where is the Project?') )

        self.radio_browse_existing = QtWidgets.QRadioButton( T_('Browse for an existing project') )
        self.radio_scan_for_existing = QtWidgets.QRadioButton( T_('Scan for existing projects') )

        self.radio_scan_for_existing.setChecked( True )
        self.radio_browse_existing.setChecked( False )

        self.grp_show = QtWidgets.QButtonGroup()
        self.grp_show.addButton( self.radio_scan_for_existing )
        self.grp_show.addButton( self.radio_browse_existing )

        self.all_clone_radio = []
        for id_, page in sorted( wizard_state.all_clone_pages.items() ):
            radio = QtWidgets.QRadioButton( page.radioButtonLabel() )
            self.all_clone_radio.append( (id_, radio) )
            self.grp_show.addButton( radio )

        self.all_init_radio = []
        for id_, page in sorted( wizard_state.all_init_pages.items() ):
            radio = QtWidgets.QRadioButton( page.radioButtonLabel() )
            self.all_init_radio.append( (id_, radio) )
            self.grp_show.addButton( radio )

        layout = QtWidgets.QVBoxLayout()
        layout.addWidget( QtWidgets.QLabel( '<b>%s</b>' % (T_('Add an existing local project'),) ) )
        layout.addWidget( self.radio_scan_for_existing )
        layout.addWidget( self.radio_browse_existing )

        layout.addWidget( QtWidgets.QLabel( '<b>%s</b>' % (T_('Add an external project'),) ) )
        for id_, radio in self.all_clone_radio:
            layout.addWidget( radio )

        layout.addWidget( QtWidgets.QLabel( '<b>%s</b>' % (T_('Create an empty project'),) ) )
        for id_, radio in self.all_init_radio:
            layout.addWidget( radio )

        self.setLayout( layout )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号