lineyka_chat.py 文件源码

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

项目:lineyka 作者: volodya-renderberg 项目源码 文件源码
def __init__(self, MW):
        G.MW = MW

        task_data = MW.current_task
        nik_name = MW.current_user
        project = MW.current_project

        # make widjet
        ui_path = MW.chat_main_path
        # widget
        loader = QtUiTools.QUiLoader()
        file = QtCore.QFile(ui_path)
        #file.open(QtCore.QFile.ReadOnly)
        window = G.MW.chatMain = loader.load(file, MW)
        file.close()

        # fill meta data
        window.setWindowTitle('Lineyka Chat')
        window.chat_nik_name_label.setText(nik_name)
        window.chat_asset_name_label.setText(task_data['asset'])
        window.chat_task_name_label.setText(task_data['task_name'].split(':')[1])

        # button connect
        window.close_button.clicked.connect(partial(MW.close_window, window))
        window.reload_button.clicked.connect(partial(self.chat_load_topics, window))
        window.chat_add_topic_button.clicked.connect(partial(self.chat_new_topic_ui, window))

        window.show()

        self.chat_load_topics(window)

        print(MW.chat_status)

        # edit read_status
        if G.MW.chat_status == 'manager':
            result = G.MW.db_chat.task_edit_rid_status_read(project, task_data, nik_name)
            if not result[0]:
                G.MW.message(result[1], 2)
                return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号