def defineInputWin(self):
inputFrame = LabelFrame(self.rootPage, text="Input Window")
inputFrame.place(relx=0.01, relwidth=0.95, rely=0.01, relheight=0.2)
def jenkins():
Config = LabelFrame(inputFrame, text="Jenkins Config")
Config.place(relx=0.01, relwidth=0.32, rely=0.01, relheight=0.95)
ID = Label(Config, text="projectID: ")
ID.place(relx=0.01, relwidth=0.3, rely=0.01, relheight=0.3)
idEntry = Entry(Config, textvariable=self.URL, state="normal")
idEntry.place(relx=0.31, relwidth=0.2, rely=0.03, relheight=0.2)
NAME = Label(Config, text="PipeLine:")
NAME.place(relx=0.01, relwidth=0.3, rely=0.32, relheight=0.3)
nameEntry = Entry(Config, textvariable=self.proName, state="normal")
nameEntry.place(relx=0.31, relwidth=0.5, rely=0.36, relheight=0.2)
version = Label(Config, text="BuildVersion: ")
version.place(relx=0.01, relwidth=0.3, rely=0.63, relheight=0.3)
versionEntry = Entry(Config, textvariable=self.version, state="normal")
versionEntry.place(relx=0.31, relwidth=0.5, rely=0.63, relheight=0.2)
def saveConfig():
api.Save_Config_File_Path("Jenkins Config", "projectId", self.version)
api.Save_Config_File_Path("Jenkins Config", "projectId", self.URL)
api.Save_Config_File_Path("Jenkins Config", "projectName", self.proName)
save = Button(Config, text="保存配置", command=lambda: saveConfig())
save.place(relx=0.54, relwidth=0.18, rely=0.03, relheight=0.2)
jenkins()
def Debugger():
Config = LabelFrame(inputFrame, text="Debugger Config")
Config.place(relx=0.34, relwidth=0.32, rely=0.01, relheight=0.95)
def winIdea():
path = Label(Config, text="winIDEA Path: ")
path.place(relx=0.01, relwidth=0.32, rely=0.03, relheight=0.2)
pathEntry = Entry(Config, textvariable=self.winIdeaPath, state="normal")
pathEntry.place(relx=0.32, relwidth=0.4, rely=0.03, relheight=0.2)
pathBtn = Button(Config, text="选择路径", command=lambda: api.SelectPath("WinIDEA Config",
"path", self.winIdeaPath))
pathBtn.place(relx=0.75, relwidth=0.2, rely=0.03, relheight=0.2)
coreBtn = Checkbutton(Config, text="Core-0 Debug", variable=self.core,
command="")
coreBtn.place(relx=0.04, relwidth=0.32, rely=0.33, relheight=0.2)
winIdea()
Debugger()
self.savePath = StringVar()
self.readPath = StringVar()
def other():
Config = LabelFrame(inputFrame, text="Other Config")
Config.place(relx=0.67, relwidth=0.32, rely=0.01, relheight=0.95)
canoePath = Label(Config, text="CANOE Path: ")
canoePath.place(relx=0.01, relwidth=0.32, rely=0.03, relheight=0.2)
pathEntry = Entry(Config, textvariable=self.canoePath, state="normal")
pathEntry.place(relx=0.32, relwidth=0.4, rely=0.03, relheight=0.2)
pathBtn = Button(Config, text="选择路径",
command=lambda: api.SelectPath("Tool Config", "canoePath", self.canoePath))
pathBtn.place(relx=0.75, relwidth=0.2, rely=0.03, relheight=0.2)
reportPath = Label(Config, text="Report Path: ")
reportPath.place(relx=0.01, relwidth=0.32, rely=0.25, relheight=0.2)
reportEntry = Entry(Config, textvariable=self.reportPath, state='normal')
reportEntry.place(relx=0.32, relwidth=0.4, rely=0.25, relheight=0.2)
reportBtn = Button(Config, text="选择路径",
command=lambda: api.SelectPath("Tool Config", "reportPath", self.reportPath,
isFile=False))
reportBtn.place(relx=0.75, relwidth=0.2, rely=0.25, relheight=0.2)
other()
将上述代码转换成 pyqt6代码实现