Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
accessibility_movie_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵心治
accessibility_movie_2
Commits
3f1a5604
Commit
3f1a5604
authored
Nov 10, 2022
by
翟艳秋(20软)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix the bug in create_project
parent
262fe4ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
create_dialog.py
create_dialog.py
+4
-3
main_window.py
main_window.py
+7
-3
No files found.
create_dialog.py
View file @
3f1a5604
...
...
@@ -6,9 +6,9 @@ from create_dialog_ui import Ui_Dialog
from
prompt_dialog
import
Prompt_Dialog
class
Create_Dialog
(
QDialog
,
Ui_Dialog
):
def
__init__
(
self
,
projectContext
):
init_project_signal
=
pyqtSignal
(
str
)
def
__init__
(
self
):
super
(
Create_Dialog
,
self
)
.
__init__
()
self
.
projectConext
=
projectContext
self
.
setupUi
(
self
)
self
.
setWindowTitle
(
"新建工程"
)
self
.
get_dir
.
clicked
.
connect
(
self
.
choose_root
)
...
...
@@ -29,7 +29,8 @@ class Create_Dialog(QDialog, Ui_Dialog):
self
.
prompt_dialog
.
show_with_msg
(
"已存在同名文件夹"
)
return
os
.
mkdir
(
self
.
project_path
)
self
.
projectConext
.
project_base_dir
=
self
.
project_path
# 发送信号给主界面,提示更新工程界面
self
.
init_project_signal
.
emit
(
self
.
project_path
)
self
.
close
()
elif
len
(
self
.
project_name
)
==
0
:
self
.
prompt_dialog
.
show_with_msg
(
"请输入工程名称"
)
...
...
main_window.py
View file @
3f1a5604
...
...
@@ -49,7 +49,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
assemble_dialog
.
start_assemble_signal
.
connect
(
self
.
synthesis
.
synthesis_slot
)
self
.
create_dialog
=
Create_Dialog
(
self
.
projectContext
)
self
.
create_dialog
=
Create_Dialog
()
self
.
create_dialog
.
init_project_signal
.
connect
(
self
.
init_project
)
# 工程导出相关组件
self
.
export
=
ExportProcessor
()
...
...
@@ -270,13 +271,16 @@ class MainWindow(QMainWindow, Ui_MainWindow):
def
show_create_dialog
(
self
):
self
.
create_dialog
.
show
()
if
self
.
projectContext
.
project_base_dir
is
not
None
:
self
.
import_movie
.
setEnabled
(
True
)
def
show_warning_msg_box
(
self
,
msg
:
str
):
replp
=
QtWidgets
.
QMessageBox
.
question
(
self
,
u'警告'
,
msg
,
QtWidgets
.
QMessageBox
.
Yes
)
# 新建工程后,初始化工程
def
init_project
(
self
,
project_path
):
self
.
projectContext
.
Init
(
project_path
)
self
.
import_movie
.
setEnabled
(
True
)
# 导入视频
def
import_slot
(
self
):
video_path
=
self
.
openVideoFile
()
.
path
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment