示例#1
0
文件: main.py 项目: xen0n/zhihu-rss
def set_views():
    root_view = _my_app.root_view

    set_button(root_view, 'add_button', lambda: add.show_add_dialog(_my_app, ADD_QML_DIR, ErrorDialog()))

    set_menu(root_view, 'change_notice_method', lambda: show_change_dialog(_my_app, CHANGE_QML_DIR))
    set_menu(root_view, 'delete_noticer', lambda: del_noticer(root_view))

    _my_app.web_view = root_view.findChild(QObject, 'web_view')

    root_view.sendClicked.connect(set_is_read)

    listview.load_noticers_listview(root_view)
示例#2
0
文件: add.py 项目: xen0n/zhihu-rss
def show_add_dialog(my_app, qml, error_dialog):
    add_dialog = MyView(qml)
    add_dialog.show()
    set_button(add_dialog.root_view, 'button',
               lambda: record_add_info(my_app, add_dialog, error_dialog))
示例#3
0
文件: sign.py 项目: xen0n/zhihu-rss
def show_sign_dialog(my_app, qml):
    sign_dialog = MyView(qml)
    sign_dialog.show()

    set_button(sign_dialog.root_view, 'button',
               lambda: record_sign_info(my_app, sign_dialog.root_view, sign_dialog))