本文整理汇总了Python中pyasm.web.Table.add_header方法的典型用法代码示例。如果您正苦于以下问题:Python Table.add_header方法的具体用法?Python Table.add_header怎么用?Python Table.add_header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.web.Table
的用法示例。
在下文中一共展示了Table.add_header方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_delivery_snapshot_section
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_delivery_snapshot_section(self):
label_value_pairs = (
('Feature', 'feature_delivery_snapshot'),
('Trailer', 'trailer_delivery_snapshot'),
('Alt Audio', 'alt_audio_delivery_snapshot'),
('Subtitle', 'subtitle_delivery_snapshot'),
('CC', 'cc_delivery_snapshot'),
('Vendor Notes', 'vendor_notes_delivery_snapshot'),
('Poster Art', 'poster_art_delivery_snapshot'),
('Dub Card', 'dub_card_delivery_snapshot')
)
table = Table()
table.add_style('float', 'left')
table.add_row()
table.add_header('Delivery Snapshot')
for label_value_pair in label_value_pairs:
label, value = label_value_pair
table.add_row()
table.add_cell(label)
table.add_cell(self.get_true_false_select_wdg(value))
section_div = DivWdg()
section_div.add(table)
return section_div
示例2: get_section_one_table_three
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_section_one_table_three(self, label_value_pairs):
table = Table()
table.add_row()
table.add_header('Confirm the build of trailer/preview')
for label_value_pair in label_value_pairs:
label, value = label_value_pair
table.add_row()
table.add_cell(label)
table.add_cell(self.get_true_false_select_wdg(value))
return table
示例3: get_section_two_bottom_table
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_section_two_bottom_table(self):
table = Table()
table.add_style('margin', '10px')
table.add_row()
table.add_header('')
table.add_header('Feature')
table.add_header('Audio Bundle')
table.add_header('Trailer/Preview')
label_value_pairs = (
('Audio configuration verified (stereo or mono/mapping is correct)?', 'audio_configuration_verified'),
('Audio is in sync with video (checked in 3 random spots and head/tail)?', 'audio_in_sync_with_video'),
('Audio is tagged correctly?', 'audio_tagged_correctly'),
('No audio is cut off (at beginning or end)?', 'no_audio_cut_off'),
('TRT of audio equals TRT of the video?', 'trt_audio_equals_trt_video'),
('Correct language is present (on applicable channels)?', 'correct_language_present')
)
for label_value_pair in label_value_pairs:
table.add_row()
table.add_cell(label_value_pair[0])
for section in ('feature', 'audio', 'preview'):
table.add_cell(self.get_true_false_select_wdg(label_value_pair[1] + '_' + section))
return table
示例4: get_element_profile_table
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_element_profile_table(self):
element_profile_table = Table()
element_profile_table.add_row()
element_profile_table.add_header('Element Profile')
element_profile_table.add_row()
element_profile_table.add_cell('Total Runtime')
element_profile_table.add_cell(get_text_input_wdg('total_runtime',
get_attribute_or_none(self, 'total_runtime'), 300))
element_profile_table.add_cell('Language')
element_profile_table.add_cell(self.get_language_select())
element_profile_table.add_row()
element_profile_table.add_cell('TV/Feature/Trailer')
element_profile_table.add_cell(get_text_input_wdg('tv_feature_trailer',
get_attribute_or_none(self, 'tv_feature_trailer'), 300))
element_profile_table.add_cell('(CC)/Subtitles')
element_profile_table.add_cell(get_text_input_wdg('cc_subtitles',
get_attribute_or_none(self, 'cc_subtitles'), 300))
element_profile_table.add_row()
element_profile_table.add_cell('Video Aspect Ratio')
element_profile_table.add_cell(self.get_video_aspect_ratio_select_wdg())
element_profile_table.add_cell('VITC')
element_profile_table.add_cell(get_text_input_wdg('vitc', get_attribute_or_none(self, 'vitc'), 300))
element_profile_table.add_row()
element_profile_table.add_cell('Textless @ Tail')
element_profile_table.add_cell(get_text_input_wdg('textless_tail',
get_attribute_or_none(self, 'textless_tail'), 300))
element_profile_table.add_cell('Source Barcode')
element_profile_table.add_cell(get_text_input_wdg('source_barcode',
get_attribute_or_none(self, 'source_barcode'), 300))
element_profile_table.add_row()
element_profile_table.add_cell('Notices')
element_profile_table.add_cell(get_text_input_wdg('notices',
get_attribute_or_none(self, 'notices'), 300))
element_profile_table.add_cell('Element QC Barcode')
element_profile_table.add_cell(get_text_input_wdg('element_qc_barcode',
get_attribute_or_none(self, 'element_qc_barcode'), 300))
element_profile_table.add_row()
element_profile_table.add_cell('Label')
element_profile_table.add_cell(self.get_label_select_wdg())
element_profile_table.add_cell('Record Date')
element_profile_table.add_cell(self.get_record_date_calendar_wdg())
return element_profile_table
示例5: get_section_four_table_two
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_section_four_table_two(self, label_value_pairs):
table = Table()
table.add_row()
table.add_header('Poster Art (One Sheet)')
for label_value_pair in label_value_pairs:
label, value = label_value_pair
table.add_row()
table.add_cell(label)
table.add_cell(self.get_true_false_select_wdg(value))
return table
示例6: get_section_four_table_one
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_section_four_table_one(self, label_value_pairs):
table = Table()
table.add_style('float', 'left')
table.add_row()
table.add_header('Chapter Thumbnails')
for label_value_pair in label_value_pairs:
label, value = label_value_pair
table.add_row()
table.add_cell(label)
table.add_cell(self.get_true_false_select_wdg(value))
return table
示例7: get_section_one_table_two
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_section_one_table_two(self, label_value_pairs):
table = Table()
table.add_style('float', 'left')
table.add_row()
table.add_header('Confirm the build of the feature')
for label_value_pair in label_value_pairs:
label, value = label_value_pair
table.add_row()
table.add_cell(label)
table.add_cell(self.get_true_false_select_wdg(value))
return table
示例8: get_files_checkbox_from_file_list
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_files_checkbox_from_file_list(file_sobjects, selected_file_sobjects):
"""
Given a list of file sobjects, return a table of Checkbox widgets (CheckboxWdg) using the file paths and codes.
If a file is also in the selected_file_sobjects list, check it automatically.
:param file_sobjects: List of file sobjects
:param selected_file_sobjects: List of file sobjects (that are already selected)
:return: Table
"""
files_checkbox_table = Table()
header_row = files_checkbox_table.add_row()
header = files_checkbox_table.add_header(data='Files', row=header_row)
header.add_style('text-align', 'center')
header.add_style('text-decoration', 'underline')
for file_sobject in file_sobjects:
checkbox = CheckboxWdg(name=file_sobject.get_code())
if file_sobject.get_code() in [selected_file.get_code() for selected_file in selected_file_sobjects]:
checkbox.set_checked()
checkbox_row = files_checkbox_table.add_row()
files_checkbox_table.add_cell(data=checkbox, row=checkbox_row)
files_checkbox_table.add_cell(data=file_sobject.get_value('file_path'), row=checkbox_row)
return files_checkbox_table
示例9: get_sobject_info_wdg
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_sobject_info_wdg(my):
div = DivWdg()
return div
attr_table = Table()
div.add(attr_table)
attr_table.add_color("color", "color")
sobject = my.get_sobject()
titles, exprs = my.get_sobject_info()
for title, expr in zip(titles, exprs):
try:
value = Search.eval(expr, sobject)
except Exception, e:
print "WARNING: ", e.message
continue
if value == '':
value = '<i>none</i>'
if len(value) > 100:
value = "%s..." % value[:100]
attr_table.add_row()
th = attr_table.add_header("%s: " % title)
th.add_style("text-align: left")
td = attr_table.add_cell(value)
示例10: get_display
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_display(self):
top = self.top
top.add_style("padding: 20px")
top.add_color("background", "background")
start_date = 'xxx'
end_date = 'xxx'
days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
start_time = '06:00'
end_time = '21:00'
table = Table()
top.add(table)
table.add_row()
table.add_header()
for day in days:
td = table.add_header(day)
for hour in xrange(6, 21):
tr = table.add_row()
td = table.add_cell()
td.add("%0.2d:00" % hour)
td.add_color("background", "background3")
for day in days:
td = table.add_cell()
day_div = DivWdg()
td.add(day_div)
day_div.add_style("width: 100px")
day_div.add_style("height: 50px")
day_div.add_border()
day_div = DivWdg()
return top
示例11: get_video_measurements_table
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_video_measurements_table(self):
video_measurements_table = Table()
video_measurements_table.add_row()
video_measurements_table.add_header('Video Measurements')
text_input_name_id_pairs = [
('Active Video Begins', 'active_video_begins'),
('Active Video Ends', 'active_video_ends'),
('Horizontal Blanking', 'horizontal_blanking'),
('Luminance Peak', 'luminance_peak'),
('Chroma Peak', 'chroma_peak'),
('Head Logo', 'head_logo'),
('Tail Logo', 'tail_logo')
]
self.setup_table_rows_with_input_boxes(video_measurements_table, text_input_name_id_pairs)
return video_measurements_table
示例12: get_operator_section
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_operator_section(self):
operator_table = Table()
operator_table.add_attr('class', 'operator_table')
operator_table.add_row()
operator_table.add_header('DATE')
operator_table.add_header('OPERATOR')
operator_table.add_header('STYLE')
operator_table.add_header('BAY')
operator_table.add_header('MACHINE')
operator_table.add_row()
operator_table.add_cell(self.get_date_calendar_wdg())
operator_table.add_cell(get_text_input_wdg('operator', get_attribute_or_none(self, 'operator')))
operator_table.add_cell(self.get_style_select())
operator_table.add_cell(self.get_bay_select())
operator_table.add_cell(self.get_machine_select())
return operator_table
示例13: get_audio_configuration_section_table
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_audio_configuration_section_table(self, name, id, float_left=True):
table = Table()
if float_left:
table.add_style('float: left')
table.add_style('margin', '10px')
table.add_row()
table.add_header(name)
for i in range(1, 9):
table.add_row()
label_cell = table.add_cell('TRK. {0}'.format(i))
label_cell.add_style('padding', '10px 10px 10px 0px')
table.add_cell(self.get_language_select_wdg(id + '_language_' + str(i)))
table.add_cell(self.get_type_select_wdg(id + '_type_' + str(i)))
return table
示例14: get_program_format_table
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_program_format_table(self):
program_format_table = Table()
program_format_table.add_style('float', 'left')
program_format_table.add_row()
program_format_table.add_header('Program Format')
program_format_table.add_header()
text_input_name_id_pairs = [
('Roll-up (blank)', 'roll_up_blank'),
('Bars/Tone', 'bars_tone'),
('Black/Silence', 'black_silence_1'),
('Slate/Silence', 'slate_silence'),
('Black/Silence', 'black_silence_2'),
('Start of Program', 'start_of_program'),
('End of Program', 'end_of_program')
]
self.setup_table_rows_with_input_boxes(program_format_table, text_input_name_id_pairs, timecode=True)
return program_format_table
示例15: get_section_one_table_one
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_header [as 别名]
def get_section_one_table_one(self, label_value_pairs_1, label_value_pairs_2):
table = Table()
table.add_row()
table.add_header('')
table.add_header('Feature')
table.add_header('Trailer/Preview')
for label_value_pair in label_value_pairs_1:
label, value = label_value_pair
table.add_row()
table.add_cell(label)
for column in ('feature', 'preview'):
select_wdg_id = value + '_' + column
table.add_cell(self.get_true_false_select_wdg(select_wdg_id))
for label_value_pair in label_value_pairs_2:
label, value = label_value_pair
table.add_row()
table.add_cell(label)
table.add_cell()
table.add_cell(self.get_true_false_select_wdg(value))
return table