plugin_config_gui.py 文件源码

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

项目:ecel 作者: ARL-UTEP-OC 项目源码 文件源码
def create_config_vbox(self, inputs, types, constraints, trace_str):
        vbox_main = gtk.VBox()

        sensitivity_group = []

        for (key, value), (_, value_type) in zip(inputs.items(), types.items()):
            delimiter = self.current_plugin_config.TRACE_DELIMITER
            if trace_str == "":
                delimiter = ""
            cur_trace_str = trace_str + delimiter + str(key)
            if isinstance(value_type, dict):
                frame = gtk.Frame(key.title() + ":")
                sensitivity_group.append(frame)
                vbox_main.pack_start(frame)
                vbox_frame = self.create_config_vbox(inputs[key], value_type, constraints, cur_trace_str)
                frame.add(vbox_frame)
            else:
                if cur_trace_str in constraints:
                    constraint = constraints[cur_trace_str]
                    item = self.value_type_create.get(value_type, self.create_error_hbox)(
                        key, inputs[key], cur_trace_str, sensitivity_group, constraint)
                else:
                    item = self.value_type_create.get(value_type, self.create_error_hbox)(
                        key, inputs[key], cur_trace_str, sensitivity_group)
                vbox_main.pack_start(item)

        return vbox_main
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号