本文整理匯總了Python中gui.MainWindow.set_timestamp_filename方法的典型用法代碼示例。如果您正苦於以下問題:Python MainWindow.set_timestamp_filename方法的具體用法?Python MainWindow.set_timestamp_filename怎麽用?Python MainWindow.set_timestamp_filename使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gui.MainWindow
的用法示例。
在下文中一共展示了MainWindow.set_timestamp_filename方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: main
# 需要導入模塊: from gui import MainWindow [as 別名]
# 或者: from gui.MainWindow import set_timestamp_filename [as 別名]
def main():
"""
Main function for the program
"""
parser = argparse.ArgumentParser(
description="Loop a video between 2 points in time based on rules in "
"a text file."
)
parser.add_argument('timestamp_filename', metavar='F', nargs='?',
help='the location of the timestamp file')
parser.add_argument('--video_filename', metavar='V',
help='the location of the video file')
args = parser.parse_args()
app = QApplication(sys.argv)
with open("gui/application.qss", "r") as theme_file:
app.setStyleSheet(theme_file.read())
main_window = MainWindow()
if args.timestamp_filename:
timestamp_filename = os.path.abspath(args.timestamp_filename)
main_window.set_timestamp_filename(timestamp_filename)
if args.video_filename:
video_filename = os.path.abspath(args.video_filename)
main_window.set_video_filename(video_filename)
sys.exit(app.exec_())